How can I have similar left side starting point for multiple plots on tiledlayout?
3 ビュー (過去 30 日間)
古いコメントを表示
I have been trying to put three plots in (3,1) style on a tiled layout. I have different resolution of data like the first one is (24,6); second one is (96,6) and third one is (288,6). Now when I try to plot them in three plots and place them in the tiled layout the beginning point on the left side do not align, so it looks odd. Can you suggest any solution for that problem. I am attaching the figure and dataset and code used for the plotting.
open sample.fig
0 件のコメント
回答 (1 件)
Matt J
2023 年 8 月 25 日
4 件のコメント
Matt J
2023 年 8 月 25 日
編集済み: Matt J
2023 年 8 月 25 日
You need to be specifying both x and y coordinate data when you plot. If you do, the plot() command will know where you want the coordinates in axes data units, and the change in sampling resolution won't matter, e.g.,
tiledlayout(2,1)
nexttile
x=linspace(1,5,10); %low resolution
plot(x,x.^2);
xlim([0,5]); xlabel x, ylabel x^2
nexttile
x=linspace(1,5,10000); %high resolution
plot(x,x.^2);
xlim([0,5]); xlabel x, ylabel x^2
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!