How to use subplot to keep the aspect ratios of the individual plots?
26 次查看(过去 30 天)
显示 更早的评论
Hi all!
at the moment i have the following problem:
i use "plot" to get some nice plots of concentration-time profiles (x-axis: Time, y-axis: Concentration). Now i want to plot two x-y-plots side by side without loosing the look (ratio of x-axis to y-axis) of the original/individual plots? Can i do that with subplot? When i use subplot the first plot goes to subplot(1,2,1) and the second to subplot(1,2,2). The problem is, that the space for the x-axes is shrunken to half of the original size. So that the x-axes are much shorter than the y-axes.
Is it possible to plot the two x-y-plots side-by-side in a way that they look as if they were plotted "alone" using subplot?
I hope i could make my problem understandable :)
Thank you in advance! Darax
0 个评论
回答(1 个)
Daniel Armyr
2016-2-2
This function changes the aspect ratio of plots: http://se.mathworks.com/help/matlab/ref/pbaspect.html
There is even a specific example that looks exactly like what you are describing:
ax1 = subplot(2,1,1);
surf(peaks)
ax2 = subplot(2,1,2);
plot(peaks)
pbaspect(ax2,[2 1 1])
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Subplots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!