Set a new colormap

5 Ansichten (letzte 30 Tage)
Vicky
Vicky am 11 Feb. 2020
Kommentiert: Vicky am 11 Feb. 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.

Akzeptierte Antwort

jessupj
jessupj am 11 Feb. 2020
Bearbeitet: jessupj am 11 Feb. 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 Kommentare
jessupj
jessupj am 11 Feb. 2020
Bearbeitet: jessupj am 11 Feb. 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 am 11 Feb. 2020
Thanks so much! It works now! :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Colormaps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by