How to clear figures in Live Editor in 2020b?

108 views (last 30 days)
I just update to 2020b and notice there are some differences in the new release. First, "Run section" and "Section break" buttons are exchanged. I guess this is due to the usage of "Run section" is more frequenctly than the usage of "Section break". However, this is not compactible to classic editor. "Run section" in classic editor has identical position as "Section break" in live editor, which results in some inconvineince. Second, I cannot clear figures with "Clear all output". I would like to clear all figures and plot new figures in new execution, however, the old figures cannot be removed. No matter of what I do, they are still there. "Clear all output" does work in 2020a. I don't know why it doesn't work in 2020b.
Ryan on 9 Oct 2020
x = 1:256;
plot(x,x), hold on
Below is the figure I plot and "clear all output" four times. There is supposed to be only one line in the figure.

Sign in to comment.

Answers (1)

Michael Ramseier
Michael Ramseier on 6 Oct 2020
I found a little work around:
When you put clf (clear current figure - before the plot command it works. But in my opinion that's not the way the live editor should work.
Nathaniel H Werner
Nathaniel H Werner on 17 Jun 2022
This is a consistent "bug"/issue that has been described for the live editor since near it's inception and has not been addressed.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!