How to apply colormapeditor to all subplots?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Gautam Mohan
le 17 Oct 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!
Réponses (0)
Voir également
Catégories
En savoir plus sur Blue dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!