[Matplotlib-users] How to close plot window in interactive mode?

Benjamin Root ben.v.root at gmail.com
Tue Jun 30 16:36:49 EDT 2020


If the figure was created through the pyplot interface (e.g., plt.figure(),
plt.subplots()), then plt.close(fig)) is the best way to close it
programmatically both in the interactive and non-interactive modes. If the
figure was constructed directly without pyplot, then that is a fair bit
trickier to do, depending on the context of the code.

Ben Root


On Tue, Jun 30, 2020 at 2:55 PM Gilles Allard <gallard at digimicro.ca> wrote:

> Hi!
> I'm searching for a way to close (programmatically) a plot window in
> interactive mode.
> What is the best way?
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20200630/d424ca76/attachment.html>


More information about the Matplotlib-users mailing list