Commit 3c6081f3 authored by Luke Campagnola's avatar Luke Campagnola
Browse files

fixed ScatterPlotItem.setSize and setData

parent 4fad8fa3
......@@ -495,8 +495,8 @@ class ScatterPlotItem(GraphicsObject):
if isinstance(size, np.ndarray) or isinstance(size, list):
sizes = size
if kargs['mask'] is not None:
sizes = sizes[kargs['mask']]
if mask is not None:
sizes = sizes[mask]
if len(sizes) != len(dataSet):
raise Exception("Number of sizes does not match number of points (%d != %d)" % (len(sizes), len(dataSet)))
dataSet['size'] = sizes
......@@ -508,13 +508,13 @@ class ScatterPlotItem(GraphicsObject):
if update:
self.updateSpots(dataSet)
def setPointData(self, data, dataSet=None):
def setPointData(self, data, dataSet=None, mask=None):
if dataSet is None:
dataSet = self.data
if isinstance(data, np.ndarray) or isinstance(data, list):
if kargs['mask'] is not None:
data = data[kargs['mask']]
if mask is not None:
data = data[mask]
if len(data) != len(dataSet):
raise Exception("Length of meta data does not match number of points (%d != %d)" % (len(data), len(dataSet)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment