I have a scatterplot containing a large amount of points, I would like to be able to change the colors of points on the fly, and change certain ones to different colors.
The documentation for setBrush indicates that it should be able to take a list of values and set the brush colors accordingly. So far this command only works for using a single brush value for all points on a scatterplot. When I try to input a list, say for example
example=pg.ScatterPlotItem()
example.setBrush(['r']*numberofscatterpoints)
will return the following error
File "E:\Robert\WinPython-64bit-2.7.6.4\python-2.7.6.amd64\lib\site-packages\pyqtgraph\graphicsItems\ScatterPlotItem.py", line 446, in setBrush
if kargs['mask'] is not None:
KeyError: 'mask'
but if I try to use only one input value, ie
example=pg.ScatterPlotItem()
example.setBrush('r')
I have no issues. Does setBrush not actually take lists? Or am I doing something wrong?