How can I reverse colormap in contourfm?
Afficher commentaires plus anciens
I'd like to use the reverse of jet colormap in contourfm. contourfm seems to only accept standard string values for predefined colormaps.
Réponse acceptée
Plus de réponses (1)
Tony Azar
le 1 Juin 2022
0 votes
Here is how you can reverse the "jet" colormap in contourfm.
This example is from :
[N,R] = egm96geoid;
load coastlines
worldmap('world')
levels = -120:20:100;
contourfm(N,R,levels,'LineStyle','none')
geoshow(coastlat,coastlon,'Color','k')
contourcbar
colormap('jet')
colormapeditor
once the editor is loaded, click on "Edit Size and Colorspace" then check "Reverse"
Catégories
En savoir plus sur Mapping Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!