How do I apply customized colormap to other plots?
3 views (last 30 days)
Show older comments
I know how to set up colormap with the GUI interface by going to the "edit"=>"colormap".
However, I have a total of about 20 plus plots that need the same customized colormap. Other than customizing each of them manually, is there a way to set it up digitially in the m-code?
Thank you.
1 Comment
Stephen23
on 20 Sep 2014
MATLAB's help really is quite good, and it gives plenty of examples. Try using it to look up colormap .
Accepted Answer
Image Analyst
on 20 Sep 2014
Make up a 256 row by 3 matrix with all the colors in it. For example
myColorMap = jet(256);
or you can do your own custom colors, whatever you want. Then just call
colormap(myColorMap);
after you switch focus to a figure that you want that color map applied to.
2 Comments
Image Analyst
on 20 Sep 2014
Are they other plots in different axes on the same figure? Or are they in different axes on different figures?
More Answers (0)
See Also
Categories
Find more on Colormaps 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!