MATLAB Answers

SC
0

How to use the current windows for the new plot?

Asked by SC
on 9 Feb 2019
Latest activity Commented on by SC
on 9 Feb 2019
Hi,
When I run my code, everytime I need to close the current plotting windows, otherwise the next run will pop up a new window for the new plot.
I want to use the current windows for the new plot (I don't need the plot of the previous run), so that I don't need to keep closing the plotting windows.
For example, what i can do so that the 2 new plots will just replace the 2 old plots, instead of popping up a new window?
For example:-
figure
x=1:0.1:6*pi;
plot(x,sin(x));
figure
plot(x,cos(x));
Thx

  0 Comments

Sign in to comment.

Products


Release

R2016a

1 Answer

Answer by madhan ravi
on 9 Feb 2019

Remove the line figure

  1 Comment

I have multiple plots for each run. I've amended my question to reflect this. Sorry for confusion.

Sign in to comment.