TiledLayout fill with for loops

10 ビュー (過去 30 日間)
Alessandro Togni
Alessandro Togni 2021 年 4 月 27 日
コメント済み: Alessandro Togni 2021 年 4 月 28 日
Hi,
i have NumberOfPlots plots and i want to fill ceil(width(deltas_table)/15) objects of the type tiledlayout(5,3) with those plots. Deltas_table is my dataset.
That's were am i:
NumberOfPlots=width(deltas_table);
NumberOfTiles=ceil(width(deltas_table)/15);
tiles=[];
% Create tiles
for i=1:NumberOfTiles
tiles=[tiles, tiledlayout(5,3)];
end
for n=1 : NumberOfTiles
for i=1 : width(deltas_table)
figure ;
plot(deltas_table{:, i});
end
end
Then i would save those 5x3 figures without any plot visualization.
I'm not forced to use those function or methods, so i'm willing to say solutions of any kind.
Thank you in advance,
Alessandro

回答 (1 件)

Sean de Wolski
Sean de Wolski 2021 年 4 月 27 日
f = figure;
t = tiledlayout(f,5,3);
for ii = 1:15
nexttile(t)
plot(sin(1:(ii*10)))
end
  3 件のコメント
Sean de Wolski
Sean de Wolski 2021 年 4 月 28 日
This does what your question asked. If you want something else - show an example of what you want.
Alessandro Togni
Alessandro Togni 2021 年 4 月 28 日
I'm sorry, but it is not.
I have N plots corresponding to N different channels and i want to gather those plots on M 5x3 tiledlayout.
My previous post contains an example:
N=54 channels -- > N=54 plots to distribute
54=15+15+15+9, so i need M=4 5x3 tiledlayout objects to do the trick.
I want my code, given the 54 plots, to create:
  • figure 1 containing plots 1 to 15
  • figure 2 containing plots 16 to 30
  • figure 3 containing plots 31 to 45
  • figure 4 containign plots 45 to 54

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeGeographic Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by