0

Defult heatmap

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.

Rafał Swacha
  • 482
  • 2
  • 6
  • 20

1 Answers1

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.

Community
  • 1
  • 1
Dan
  • 45,079
  • 17
  • 88
  • 157