Closing a pyplot window under MSWindows and under Linux

OK, I found the answer myself. It appears that multiple calls to show() are at
the moment officially unsupported, although they do work for some backends on
some platforms (see e.g.
http://matplotlib.sourceforge.net/faq/howto_faq.html#use-show ). In particular,
I have found that:

- With Qt4Agg they work under Windows (where Qt4Agg is the default backend, at
least in the Python(X,Y) distribution) but under Linux they result in an
"Underlying C/C++ object has been deleted" error at line 64 of backend_qt4.py

- With TkAgg they fail silently under Linux (where TkAgg is the default backend,
and under Windows they cause a "Fatal Python error: PyEval_RestoreThread: NULL
tstate" exception

- with GTKAgg, not available in my Windows installation, they work well under
Linux, apart from a deprecation warning on the use of GTK.Tooltips() instead of
the new GTK.Tooltip()

Considering that multiple show() functionality is important for many users (see
e.g.
http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg13099.html
) I'd like to ask the backend developers to try their best and support this
feature on as many platforms as possible.

Enzo

http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.ion

hth,
Alan Isaac

ยทยทยท

On 4/3/2010 11:19 PM, Enzo Michelangeli wrote:

multiple show() functionality is important for many users (see
e.g.
[Matplotlib-users] show() problem in Mac OS X 10.5.8