Effacer les filtres
Effacer les filtres

Distribute the subplots to two different figures

7 vues (au cours des 30 derniers jours)
as hz
as hz le 25 Sep 2012
Hi,
I have several graphs which I plotted using subplot. How can I distribute the subplots to two different output figures (like two pages)?
Thanks

Réponses (2)

Matt Fig
Matt Fig le 25 Sep 2012
Modifié(e) : Matt Fig le 25 Sep 2012
% First the subplots
figure
s(1) = subplot(1,2,1);
plot(1:10)
s(2) = subplot(1,2,2);
ezplot('x.^2')
% Now move them.
figure
set(s(1),'parent',gcf,'pos',[.1 .1 .8 .8])
figure
set(s(2),'parent',gcf,'pos',[.1 .1 .8 .8])
  4 commentaires
Image Analyst
Image Analyst le 25 Sep 2012
Or they kidnapped them.
Matt Fig
Matt Fig le 25 Sep 2012
Modifié(e) : Matt Fig le 25 Sep 2012
Haha, either way figure 1 is left childless. I suppose one could be kinder and not take them both:
figure
s(1) = subplot(1,2,1);
plot(1:10)
s(2) = subplot(1,2,2);
ezplot('x.^2')
% Now move one.
figure
set(s(1),'parent',gcf,'pos',[.1 .1 .8 .8])
set(s(2),'pos',[.1 .1 .8 .8])

Connectez-vous pour commenter.


Akshay Kumar
Akshay Kumar le 8 Août 2018
Hey, you can use this code to do that Click here

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by