Set a new colormap

3 vues (au cours des 30 derniers jours)
Vicky
Vicky le 11 Fév 2020
Commenté : Vicky le 11 Fév 2020
Hi, I would like to set a new colormap for my trisurf from the cmocean collection. Does anyone know how to set one of them? Thank you.

Réponse acceptée

jessupj
jessupj le 11 Fév 2020
Modifié(e) : jessupj le 11 Fév 2020
It should be as easy as calling something like
cmap = cmocean('thermal'); % or 'deep', or whichever colormap from the collection you want.
cmocean maps are great, but may not be appreciated by reviewers
  3 commentaires
jessupj
jessupj le 11 Fév 2020
Modifié(e) : jessupj le 11 Fév 2020
what is the error it's giving you? are you sure that the cmocean.m is on your path? you also have to set the figure colormap to the one defined by the cmap command. E.g:
cmap = cmocean('thermal');
pcolor( randn(10) );
colorbar;
colormap(cmap);
Vicky
Vicky le 11 Fév 2020
Thanks so much! It works now! :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Blue dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by