4

I would like to delete all the plots in the plot pane with some code so I can automatically "clear" the interface. I am aware there is a button you can click that deletes them all. However, I would like to avoid having to click manually on the plot pane to delete all the plots generated in the previous runs.

Right now I am already clearing the console and the variable explorer by using (which I got from link):

    try:
    from IPython import get_ipython
    get_ipython().magic('clear')
    get_ipython().magic('reset -f')
except:
    pass

Now I would like to add there something that also clears the plot pane.

El_que_no_duda
  • 355
  • 4
  • 15

1 Answers1

1

(Spyder maintainer here) It is not possible to remove all plots from the Plots pane using code, sorry.

Carlos Cordoba
  • 33,273
  • 10
  • 95
  • 124