subplot内のfigureにinsetを入れる方法について
Afficher commentaires plus anciens
通常の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を入れることができるのでしょうか?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Subplots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!