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.

 Respuesta aceptada

jessupj
jessupj el 11 de Feb. de 2020
Editada: jessupj el 11 de Feb. de 2020

1 voto

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 comentarios

Vicky
Vicky el 11 de Feb. de 2020
Thank you for the reply. Unfortunately, I've tried this already, but getting error. I was wondering if there anything else I should define first. Does it work in your code?
jessupj
jessupj el 11 de Feb. de 2020
Editada: jessupj el 11 de Feb. de 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 el 11 de Feb. de 2020
Thanks so much! It works now! :)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Color and Styling en Centro de ayuda y File Exchange.

Preguntada:

el 11 de Feb. de 2020

Comentada:

el 11 de Feb. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by