Hi all,

I am struggling to find a way to obtain absolute colormaps with pyqtgraph. 
The code snippet below is what I am using to define my colormap:


c_pos = np.array([31*0.0, 31*0.25, 31*0.75, 31*1.0])
c_color = np.array([[0, 0, 0, 255], [255, 0, 0, 255], [255, 255, 0, 255], [255, 
255, 255, 255]], dtype=np.ubyte)
c_map = pg.ColorMap(c_pos, c_color)
self.c_lut = c_map.getLookupTable(0.0, 31*1.0, 31)


My input data are integers ranging from 0 up to 31.

What I am trying to obtain is a uniform colormap with 0=black and 31=white, 
with shades from red to yellow in the middle.

The problem is that, if my input values are for example from 0 to 15 
(instead from 0 to 31), pyqtgraph makes the resulting colormap "relative", 
i.e. I have black for 0 up to white for 15.

Is there any way to define an absolute color map?

Thank you in advance

-- 
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/a1fe3e5a-6e1a-4415-ae07-4c92f04b9edf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to