Thanks Luke and thanks for the work-around.
I will post a new issue this weekend.
On Friday, January 13, 2017 at 3:20:33 AM UTC-5, Luke Campagnola wrote:
> It's a bug! Would you mind opening a new issue on github?
> Here's a workaround:
>> Hi Luke -
>> Thanks for all your work in pyqtgraph.
>> I'm using 0.10.0 with PyQT 5.7 on Windows 7.
>> I have built a scrolling chart that loads data from a pandas dataframe
>> that is populated from another process. It creates PlotDataItems with 500
>> data points each. Then applies np.empty() to the numpy array it and loads
>> it again with new data, etc.
>> I have found that when I add a 'symbol' argument to the plot() method
>> (see below), the previous PlotDataItems do not get shifted left during the
>> shift process. However, the current PlotDataItem shifts to the left,
>> correctly, in this situation. (See the attached screenshot:
>> 'top_symbol_curve_does_not_shift_left.PNG' - you'll note lime green lines
>> at the left of the screenshot where the top symbol-based plotdataitems get
>> out of sync with the 'white line' plotdataitem.
>> However, when I take out the symbol argument, the second line scrolls to
>> the left perfectly (as you probably know - this a modification from one of
>> your samples). See 'both_curves_shift_left.PNG' screenshot for how this
>> works correctly.
>> for index,row in pandas_df.iterrows():
>> move_value = move_position(0.15) # THIS IS A CALL TO A
>> FUNCTION THAT GENERATES AN INCREMENTED VALUE INSTEAD OF USING NOW()
>> shift = (move_value * -1)
>> for c in curves:
>> c.setPos(shift, 0) # moves the curve
>> for c2 in curves2:
>> i = ptr5 % 500
>> if i==0:
>> curve = p5.plot()
>> curve2 = p5.plot(pen=(32,178,170)) #<- WORKS FINE
>> #curve2 = p5.plot(pen=None,symbol='d',
>> symbolBrush=(32,178,170)) <- ONLY THE CURRENT PLOTDATA ITEM SHIFTS.
>> PREVIOUS ONES DO NOT
>> last = data5[-1] #return last item in the list
>> last2 = pyqt_dot_np[-1]
>> data5 = np.empty([501,2]) #Return a new array of given
>> shape and type, without initializing entries.
>> pyqt_dot_np = np.empty([501,2])
>> data5 = last
>> pyqt_dot_np = last2
>> curve = curves[-1] #return last item in the list
>> curve2 = curves2[-1]
>> vb = curve.getViewBox()
>> xrange = vb.viewRange()
>> data5[i+1,0] = move_value
>> pyqt_dot_np[i+1,0] = move_value
>> data5[i+1,1] = row['Zscores'] # 2-D array - y values
>> curve.setData(x=data5[:i+2, 0], y=data5[:i+2, 1])
>> pyqt_dot_np[i+1,1] = row['Zscores'] + 0.5
>> curve2.setData(x=pyqt_dot_np[:i+2, 0], y=pyqt_dot_np[:i+2, 1])
>> Is this a bug?
>> Do I need to do something differently to scroll previously added symbol
>> Thanks kindly,
>> You received this message because you are subscribed to the Google Groups
>> "pyqtgraph" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> To view this discussion on the web visit
>> For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To view this discussion on the web visit
For more options, visit https://groups.google.com/d/optout.