Closing a pyplot window under MSWindows and under Linux

Alan G Isaac <alan.isaac@...83...> writes:

> multiple show() functionality is important for many users (see
> e.g.
>

http://www.mail-archive.com/matplotlib-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
<at> public.gmane.org/msg13099.html

>

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

From what I undrstand, ion() doesn't do what I need: it just forces a draw()

after every pyplot command allowing animated plots. Instead, I want the program
to draw and show a complete plot, then pause allowing me to interact with its
window (e.g., to pan, zoom and/or save a screenshot), then, after I close that
window, proceed to build a new, entirely different plot, show it in a new window
and so on.

Enzo

···

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

import numpy as np
import matplotlib.pyplot as plt
plt.ion()

for _ in range(3):
     data = np.random.randint(0, 9,(4,))
     fig = plt.figure()
     ax = fig.add_subplot(1,1,1)
     ax.plot(data)
     raw_input("Hit Enter to continue")

hth,
Alan Isaac

···

On 4/4/2010 3:15 AM, Enzo Michelangeli wrote:

ion() doesn't do what I need: it just forces a draw()
after every pyplot command allowing animated plots. Instead, I want the program
  to draw and show a complete plot, then pause allowing me to interact with its
window (e.g., to pan, zoom and/or save a screenshot), then, after I close that
window, proceed to build a new, entirely different plot, show it in a new window
and so on.