curves = [0]*len(y)
for i in range(0,len(y)): if headers[i][0:3] == 'fit': print('try') curves[i] = self.p.plot(pen='r',name='happy') # crashes else: curves[i] = self.p.plot(pen=None,symbol='o',name=headers[i], symbolSize=1, symbolPen=self.colors[i]) # works print('hi') curves[i].setData(x, y[i])curves[i] = self.p.plot(pen='r',name='happy') # crashes
curves[i] = self.p.plot(pen=None,symbol='o',name=headers[i], symbolSize=1, symbolPen=self.colors[i]) # works
Traceback (most recent call last): File "C:\Python37\lib\site-packages\pyqtgraph\graphicsItems\PlotCurveItem.py", line 174, in boundingRect (xmn, xmx) = self.dataBounds(ax=0) File "C:\Python37\lib\site-packages\pyqtgraph\graphicsItems\PlotCurveItem.py", line 131, in dataBounds b = (np.nanmin(d), np.nanmax(d)) File "<__array_function__ internals>", line 6, in nanmin File "C:\Python37\lib\site-packages\numpy\lib\nanfunctions.py", line 320, in nanmin res = np.fmin.reduce(a, axis=axis, out=out, **kwargs)TypeError: cannot perform reduce with flexible typei want to change the part it crashes on to:
curves[i] = self.p.plot(pen=self.colors[i],name=headers[i])--
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 email to pyqtgraph+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/8ba67b76-5542-4f4a-8766-fcdd5c1426b8%40googlegroups.com.