I want to use the colormap rainbow
in an image using imshow
. It works perfectly, but I want to redefine the color for the value 0
. Instead of violete, I want to use white.
I want to do this only for the value zero, all other values can stay with the default values in the colormap.
Any idea how to do this without having to edit the colormap manually?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…