Effacer les filtres
Effacer les filtres

How to change color bar for images function?

17 vues (au cours des 30 derniers jours)
NeoBeaver
NeoBeaver le 19 Août 2016
Commenté : NeoBeaver le 20 Août 2016
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

Réponse acceptée

Image Analyst
Image Analyst le 19 Août 2016
Try this
imagesc(full_B);
colorbar;
colormap(jet(256));
or even better:
imshow(full_B, []);
colorbar;
colormap(jet(256));
  1 commentaire
NeoBeaver
NeoBeaver le 20 Août 2016
thanks a lot! It works.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Orange dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by