MATLAB: How to change color bar for images function

Image Processing Toolboximagesc

Dear all:
Any one could help me with this problem:
I used the following piece of code to generate a heat map for a matrix:
clf
imagesc(full_B);
colorbar;
The color bar default look like this:
I am thinking about changing the color bar into something like rainbow.
How should I be doing it?
Thanks! Ruming

Best Answer

Try this
imagesc(full_B);
colorbar;
colormap(jet(256));
or even better:
imshow(full_B, []);
colorbar;
colormap(jet(256));
Related Question