help required using colormap function in matlab
Show older comments
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)
Accepted Answer
More Answers (1)
Sean de Wolski
on 22 Jul 2013
You can modify it interactively by using the colormapeditor
surf(peaks);
colormapeditor
(Also available through: Edit Menu -> Colormap)
Categories
Find more on Color and Styling in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!