How do I apply customized colormap to other plots?

3 views (last 30 days)
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
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 .

Sign in to comment.

Accepted Answer

Image Analyst
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
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?
Leon
Leon on 20 Sep 2014
Thank you for the reply. They are in different axes on different figures.

Sign in to comment.

More Answers (0)

Categories

Find more on Colormaps in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!