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!