How do I overlay contour plots with a different color map for each overlay
19 views (last 30 days)
Show older comments
I have been able to overlay contours using Matlab 2012b (see the example below) using freezecolors to allow each overlay to have a constant color that is different than the other overlays. But in 2015b freezecolors no longer works. According to this, I shouldn't need freezecolors anymore: http://www.mathworks.com/matlabcentral/fileexchange/7943-freezecolors---unfreezecolors
So I found this, but can't get it to work for what I am trying to do:
Any help to get this to work in 2015b would be greatly appreciated!!!
1 Comment
Carl
on 3 Apr 2017
Hi Robert, can you clarify why the second link you posted does not work for you? It seems that you should be able to overlay your contour plots, each on a separate axes with a different colormap.
Accepted Answer
KSSV
on 4 Apr 2017
Z = peaks(100) ;
% plot valaues 1
figure
hold on
colors = {'r' 'b' 'g' 'y' 'm' 'k' 'c' 'g' 'r' 'k'} ;
for i = 1:10
contour(Z,[i i],colors{i},'ShowText','on') ;
end
6 Comments
More Answers (0)
See Also
Categories
Find more on Contour Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!