added "mask" key check on setPen as well

Signed-off-by: Nicholas Tan Jerome <nicholas.jerome@kit.edu>
This commit is contained in:
Nicholas Tan Jerome 2014-10-17 11:18:12 +02:00
parent 884df4934a
commit 7356126c3d

View File

@ -421,7 +421,7 @@ class ScatterPlotItem(GraphicsObject):
if len(args) == 1 and (isinstance(args[0], np.ndarray) or isinstance(args[0], list)):
pens = args[0]
if kargs['mask'] is not None:
if if 'mask' in kargs and kargs['mask'] is not None:
pens = pens[kargs['mask']]
if len(pens) != len(dataSet):
raise Exception("Number of pens does not match number of points (%d != %d)" % (len(pens), len(dataSet)))