Can you move figures in subplot in there given subplot location?

7 Ansichten (letzte 30 Tage)
Hi community,
I have a question about the following plot. It consists out of a subplot(x,5,1:3 and 4:5) for the shape.
In the last topoplot I want to add a colorbar on the right, but this makes the figure shift to the left.
Is there a way to align all the topoplots (using only one colorbar)?

Akzeptierte Antwort

Thorsten
Thorsten am 12 Jul. 2016
h = subplot(5, 2, 10);
% your plot command here
% adjust position; the offset has to be determined by visually by trial and error
pos = get(h, 'Position')
posnew = pos; posnew(1) = posnew(1) + 0.04; set(h, 'Position', posnew)
  1 Kommentar
Jacco vD
Jacco vD am 12 Jul. 2016
Thx, your estimation of 0.04 worked perfect, so no need for trial and error ;)
Wanted to ask how this works, but I see it now

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by