help required using colormap function in matlab
Afficher commentaires plus anciens
Hello Everyone,
I am using surf function to plot a 2D matrix Z. The matrix has 61 rows and 98 columns. The data varies from 26.5 to 33.5 , and in few places I have some zeros. Till now i was using the default colourmap for plotting my data using surf command. But now I want more control over the colour pattern. I was reading through the documentation of colormap. It says that
"Specify an array of color data that is equal in size to the z- data and is used for indexed colors"
I create a matrix C of same size as Z but I still did not understand what values to put so that I can use the surf function as
figure(),surf(Z,C)
Réponse acceptée
Plus de réponses (1)
Sean de Wolski
le 22 Juil 2013
You can modify it interactively by using the colormapeditor
surf(peaks);
colormapeditor
(Also available through: Edit Menu -> Colormap)
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!