Buxfixes
- initialization error in plotcurveitem - performance fix for plotdataitem
This commit is contained in:
parent
59ed9397a3
commit
f80b73b173
@ -195,7 +195,8 @@ class PlotCurveItem(GraphicsObject):
|
||||
for k in ['x', 'y']:
|
||||
data = kargs[k]
|
||||
if isinstance(data, list):
|
||||
kargs['k'] = np.array(data)
|
||||
data = np.array(data)
|
||||
kargs[k] = data
|
||||
if not isinstance(data, np.ndarray) or data.ndim > 1:
|
||||
raise Exception("Plot data must be 1D ndarray.")
|
||||
if 'complex' in str(data.dtype):
|
||||
|
@ -322,8 +322,8 @@ class PlotDataItem(GraphicsObject):
|
||||
|
||||
x,y = self.getData()
|
||||
|
||||
self.curve.setData(x=x, y=y, **curveArgs)
|
||||
if curveArgs['pen'] is not None or curveArgs['brush'] is not None:
|
||||
if curveArgs['pen'] is not None or (curveArgs['brush'] is not None and curveArgs['fillLevel'] is not None):
|
||||
self.curve.setData(x=x, y=y, **curveArgs)
|
||||
self.curve.show()
|
||||
else:
|
||||
self.curve.hide()
|
||||
@ -331,8 +331,8 @@ class PlotDataItem(GraphicsObject):
|
||||
#curve.setParentItem(self)
|
||||
#self.curves.append(curve)
|
||||
|
||||
self.scatter.setData(x=x, y=y, **scatterArgs)
|
||||
if scatterArgs['symbol'] is not None:
|
||||
self.scatter.setData(x=x, y=y, **scatterArgs)
|
||||
self.scatter.show()
|
||||
else:
|
||||
self.scatter.hide()
|
||||
|
Loading…
Reference in New Issue
Block a user