Hi. I am using image() to show my two dimensional matrix as a heatmap, but the problem is that high values are showed in blue colors (cold ones). How to reverse the colors? Thank You for all replies.
Asked
Active
Viewed 1,547 times
1 Answers
2
From the first hit on Google: colormap(flipud(colormap))
Or else you could just invert the image itself before showing it rather than the colourmap. I'm assuming either your data goes from 0 - 1 or from 0 - 255 so instead of
imshow(I)
or imagesc(I)
or ... image(I)
? you can go imshow(1 - I)
or imshow(255 - I)
otherwise you could create a custom colormap.