How to apply colormapeditor to all subplots?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi
I have a matlab plot with 3 colormap subplots to which I would like to apply the exact same coloring. I figured out how to do that by applying the same boarder for every plot. However I am not fully satisfied with the jet-style colorbar and would like to make some minor adjustments. To do so I tried to apply the colormapeditor. However the changes I make there will be applied only on the last plot.
Is there a way to postprocess all the plots simultaneously? Or can I somehow set the color of certain values of the axis and the jet axis adjusts automatically?
Cheers Ronny
2 Kommentare
Gautam Mohan
am 17 Okt. 2016
Hi Ronny,
The colormap editor will only change the plot of the most recent axis that was plotted. Subplots contain multiple axes, which is why you are only seeing one plot changed.
The simplest solution you can do to make the change to all plots is to grab the newly-edited colormap from the last axis and apply it to all axes. Here is a short description on how to do that:
colormapeditor; % make desired edits, new colormap shows up on one plot
newColorMap = colormap(gca); % get the new colormap we just created
set(gcf,'ColorMap',newColorMap); % apply the colormap to the parent figure, so it it is reflected on all axes.
Hope this helps!
Antworten (0)
Siehe auch
Kategorien
Mehr zu Blue finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!