How to change color bar for images function?
17 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
NeoBeaver
il 19 Ago 2016
Commentato: NeoBeaver
il 20 Ago 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:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/155878/image.png)
I am thinking about changing the color bar into something like rainbow.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/155880/image.png)
How should I be doing it?
Thanks! Ruming
0 Commenti
Risposta accettata
Image Analyst
il 19 Ago 2016
Try this
imagesc(full_B);
colorbar;
colormap(jet(256));
or even better:
imshow(full_B, []);
colorbar;
colormap(jet(256));
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Orange in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!