MATLAB Answers

How to stop subsequent plots outputting to the current pane?

1 view (last 30 days)
On this page it states:
subplot divides the current figure into rectangular panes that are numbered rowwise. Each pane contains an axes object. Subsequent plots are output to the current pane.
How do I get it to stop doing that?
If I've called subplot previously then I call plot in the command window to quickly check some data the new plot updates the last plotted subplot.
Thank you for your help in advance.

Accepted Answer

Mohammad Sami
Mohammad Sami on 31 Mar 2021
To force MATLAB to create new figure, you need to call figure function before calling the plot.
Michael O'Brien
Michael O'Brien on 1 Apr 2021
ok, so if I wanted to do a quick plot to check some data without it updating the last subplot I would type
figure; plot(x,y);
in the command window?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!