How to make a Subplots using set(gca,'position') command?
Mostrar comentarios más antiguos
I would like to make one figure, with two subplots.
The dimensions for each subplot
set(gca,'Position', [0.1000 0.5971 0.2335 0.3279]) % subplot 1
hold on;
set(gca,'Position', [0.4700 0.5971 0.2335 0.3279]) % subplot 2
However, when I use this command, only the last figure axis remains, the first one disappears.
The hold on does not seem to work in this case.
Any help is greatly appriciated.
Thnak you in advance!
4 comentarios
"However, when I use this command, only the last figure axis remains, the first one disappears."
Your code only refers to one axes, which otherwise does not change and certainly does not "disappear". Nothing in your code creates or deletes axes: it simply takes one existing(?) axes and keep changing its position, that is all.
"The hold on does not seem to work in this case."
HOLD is basically unrelated to your moving one axes around the figure.
MP
el 1 de Mzo. de 2023
Jonas
el 2 de Mzo. de 2023
thanks @Stephen23
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Subplots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

