subplot内のfigureにinsetを入れる方法について
古いコメントを表示
通常のfigureにinsetを入れる場合は,例えば
close all;
x1 = 0:0.01:pi;
x2 = 0:0.01:pi/6;
y1 = sin(x1);
y2 = sin(x2);
plot(x1,y1);
axes('Position',[.7 .7 .2 .2]);
box on
plot(x2,y2);
とすれば実装できます.
しかし,subplot内のfigureにinsetを入れようとして,同様に以下のようなコードを実行すると,1つ目の図に入れたはずのinsetが表示されません.
close all;
figure('Position', [50 50 1000 400]);
x1 = 0:0.01:pi;
x2 = 0:0.01:pi/6;
y1 = sin(x1);
y2 = sin(x2);
z1 = cos(x1);
subplot(1,2,1)
plot(x1,y1);
axes('Position',[.7 .7 .2 .2]);
box on
plot(x2,y2); %これが表示されない
subplot(1,2,2)
plot(x1,z1);
どのように書けば,subplot内のfigureにinsetを入れることができるのでしょうか?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Subplots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!