フィルターのクリア

subplot within a subplot

23 ビュー (過去 30 日間)
Richard
Richard 2012 年 7 月 2 日
Is there a method for generating a subplot within a subplot? For example:
time = 1:168;
RawData = cos((2*pi)/12*time)+randn(size(time));
Data = cell(1,5);
for i = 1:3;
Data1{i} = RawData*1.2;
Data2{i} = RawData*1.5;
end
for i = 1:length(Data1)
figure(i)
subplot(2,1,1)
plot(Data1{i})
subplot(2,1,2)
plot(Data2{i})
end
Instead of having 3 figures, is it possible to have the subplots within the same figure window (i.e. subplot(2,2,i))
  1 件のコメント
Sean de Wolski
Sean de Wolski 2012 年 7 月 2 日
So
for ii = 1:8
subplot(4,2,ii)?
end
?

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

回答 (2 件)

Thomas
Thomas 2012 年 7 月 2 日
編集済み: Thomas 2012 年 7 月 2 日
time = 1:168;
RawData = cos((2*pi)/12*time)+randn(size(time));
Data = cell(1,5);
for i = 1:3;
Data1{i} = RawData*1.2;
Data2{i} = RawData*1.5;
end
figure
count=1;
for i = 1:length(Data1)
subplot(3,2,count)
plot(Data1{i})
count=count+1;
subplot(3,2,count)
plot(Data2{i})
count=count+1;
end

Walter Roberson
Walter Roberson 2012 年 7 月 2 日

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by