How to make a Subplots using set(gca,'position') command?
显示 更早的评论
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 个评论
"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
2023-3-1
Jonas
2023-3-2
thanks @Stephen23
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

