Scaling the colormap
Afficher commentaires plus anciens
Hi,
I have couple of number data as 512x512 matrix data, each point represents the height value. I plot the data by imagesc with gray colorscale and add a colorbar.
Each data has different maximum values as (18, 35, 50...) hence, MATLAB scale the colorbar automatically to the maximum of each data. But I want to use a universal scale maximum such as 50 which I can use for all individual data set.
Is it possible by using a code instead of clicking to colormap editor?
Thanks for help in advance
Réponses (1)
Wayne King
le 19 Nov 2011
0 votes
You can use caxis() to provide a range of values -- min,max
You can also define your own colormap as a matrix map = and then call colormap(map)
1 commentaire
Özgür
le 19 Nov 2011
Catégories
En savoir plus sur Color and Styling dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!