Plotting stacked graphs with diff x-axis together without any gap

4 ビュー (過去 30 日間)
Jae Bang
Jae Bang 2020 年 1 月 21 日
回答済み: Meg Noah 2020 年 1 月 21 日
I am trying to plot multiple graphs stacked together sharing one x-axis.
I cannot used stacked plot because they do not have the same x values for each y data points and I don't want to use tiled layout because I want graphs to be stacked gapless. (it's necessary for better visualization since I want to stack 17 of them together)
I also want the tick labels to only show at teh bottom but I haven't even figured out how to stack them properly.
I have:
f1=figure
for i=1:17
csvForPlot=readmatrix( ....);
figure(f1);
subplot (n,1,i);
plot(csvForPlot(:,1), csvForPlot(:,2));
xticklabels({});
end
ha=get(gcf,'children');
for i=1;n
set(ha(i), 'Position', [0.1 n-i+0.1 5 0.9]);
end
This will plot the graphs stacked but the moment it gets to teh 2nd for-loop for repositioning, only one oversized graph appears. Can somebody please help?
Thank you

採用された回答

Meg Noah
Meg Noah 2020 年 1 月 21 日

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by