Hello. I want to make a scatter chart with an array that looks like this:
arr = np.array([(0, 1, 50), (1, 2, 30), (2, 3, 10), (3, 2, 30), (4, 1,
50)],dtype=[('x_cor', 'uint32'), ('y_cor', 'uint32'), ('value', 'uint32')])
I can make a scatter chart using arr['x_cor'] and arr['y_cor']
win = pg.GraphicsWindow()
p = win.addPlot()
p.plot( arr['x_cor'], arr['y_cor'], pen=None, symbol='t', symbolPen=None,
symbolSize=10, symbolBrush=(100, 100, 255, 50))
Is it possible to set brush parameter as arr['value']?
For example, it's possible to use different symbols or sizes if you set
parameters as:
differntSizes = [50, 30, 10, 30, 50]
differntSymbols = ['t', 'd', 'o', 't', 'o']
p.plot( arr['x_cor'], arr['y_cor'], pen=None, symbol=differntSymbols ,
symbolPen=None, symbolSize=differntSizes, symbolBrush=(100, 100, 255, 50))
But when I try the code below, it doesn't work.
differntDepths = [(100, 100, 255, 50), (100, 100, 255, 10), (100, 100, 255,
30), (100, 100, 255, 10), (100, 100, 255, 50)]
p.plot( arr['x_cor'], arr['y_cor'], pen=None, symbol=differntSymbols ,
symbolPen=None, symbolSize=differntSizes, symbolBrush=differntDepths)
How can I set different color or depth for each dot?
--
You received this message because you are subscribed to the Google Groups
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pyqtgraph/4a242346-2d93-4b5c-aa9c-9cd15c6ac3da%40googlegroups.com.