- initialization error in plotcurveitem
 - performance fix for plotdataitem
This commit is contained in:
Luke Campagnola 2012-03-18 19:48:40 -04:00
parent 59ed9397a3
commit f80b73b173
2 changed files with 5 additions and 4 deletions

View File

@ -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):

View File

@ -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()