How to apply colormapeditor to all subplots?

2 visualizaciones (últimos 30 días)
Ronny
Ronny el 7 de Oct. de 2016
Comentada: Sophia el 6 de Jun. de 2018
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 comentarios
Gautam Mohan
Gautam Mohan el 17 de Oct. de 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!
Sophia
Sophia el 6 de Jun. de 2018
It worked for me..however i don't see the option to accept this as an answer

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Blue en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by