Use colormap with better perceptual contrast
This commit is contained in:
parent
5e420fe100
commit
0d2bd107b3
@ -49,10 +49,16 @@ data[:,50:60,50:60] += sig
|
|||||||
imv.setImage(data, xvals=np.linspace(1., 3., data.shape[0]))
|
imv.setImage(data, xvals=np.linspace(1., 3., data.shape[0]))
|
||||||
|
|
||||||
## Set a custom color map
|
## Set a custom color map
|
||||||
positions = [0, 0.5, 1]
|
colors = [
|
||||||
colors = [(0,0,255), (0,255,255), (255,255,0)]
|
(0, 0, 0),
|
||||||
cm = pg.ColorMap(positions, colors)
|
(45, 5, 61),
|
||||||
imv.setColorMap(cm)
|
(84, 42, 55),
|
||||||
|
(150, 87, 60),
|
||||||
|
(208, 171, 141),
|
||||||
|
(255, 255, 255)
|
||||||
|
]
|
||||||
|
cmap = pg.ColorMap(pos=np.linspace(0.0, 1.0, 6), color=colors)
|
||||||
|
imv.setColorMap(cmap)
|
||||||
|
|
||||||
## Start Qt event loop unless running in interactive mode.
|
## Start Qt event loop unless running in interactive mode.
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user