How do I apply customized colormap to other plots?

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

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

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

Are they other plots in different axes on the same figure? Or are they in different axes on different figures?
Thank you for the reply. They are in different axes on different figures.

Sign in to comment.

More Answers (0)

Categories

Tags

Asked:

on 19 Sep 2014

Commented:

on 20 Sep 2014

Community Treasure Hunt

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

Start Hunting!