how to display two graphs in separate figure windows using plot command?

738 vues (au cours des 30 derniers jours)
Harish Balaga
Harish Balaga le 23 Avr 2013
Commenté : my digit le 30 Août 2023
i use a matlab program for my project. There i want to produce two graphs at different instances. But the second graph replaces the 1st graph when that command is executed.. i want both to be displayed in separate window. I dont want both graphs in same window (using "subplot"). Is it possible in matlab?
  2 commentaires
William Clarke
William Clarke le 28 Fév 2020
Modifié(e) : William Clarke le 28 Fév 2020
So this applies to the Publish function aswell.
When you publish code using the publish tab it will put what ever is in the figure window when it is done executing the code, at the end of the document. this is annoying because you could have several plots you want to publish.
However if Place the line figure; after you are done plotting each graph then the following graph will be in a new window and they will all be included in the published document.
I.E.
plot(xa, ya);
figure;
plot(xb, yb);
figure;
plot(xc, yb);
my digit
my digit le 30 Août 2023
thank you

Connectez-vous pour commenter.

Réponse acceptée

Carlos
Carlos le 23 Avr 2013
Use figure command
plot(a);
figure;plot(b,'r');
  6 commentaires
Aniket Kumar
Aniket Kumar le 20 Sep 2020
This is working but the second plot opening under Figure 3 name ?, rather than into Figure 2
Jake Dolezal
Jake Dolezal le 12 Oct 2022
I have the same issue Aniket

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by