How do I clear a plot using Plots?

How do I clear plot in Atom? I know it is a very basic question, but I just can’t find the answer.

I am using the default backend which seems to be GR.

Kind regards


If you mean this kind of plot, then you have some buttons near the plot called “Forget plot”, etc.

Okay nice to know, that there is a way to do it manually, but how would I do it programmatically?

Currently, I am just doing “plot()” to make a new plot window, but just feels like there should be another way.

Kind regards

In order to do it programatically my approach is to use InspectDR package(which is based on Gtk). This creates plot windows that can be closed by a dedicated function, as the developer of the package explains in this topic:

I hope this helps.

1 Like

Yes it did, thank you very much. Will try to start using this package.

Kind regards