title: Python Matplotlib hangs when asked to plot a second chart (after closing first chart window)
body: <p>Weird behaviour, I'm sure it's me screwing up, but I'd like to get to the bottom of what's happening: </p>
  
  <p>I am running the following code to create a very simple graph window using matplotlib:</p>
  
  <pre><code>&gt;&gt;&gt; import matplotlib.pyplot as plt
  &gt;&gt;&gt; fig = plt.figure()
  &gt;&gt;&gt; ax = fig.add_subplot(111)
  &gt;&gt;&gt; ax.plot((1, 3, 1))
  [&lt;matplotlib.lines.Line2D object at 0x0290B750&gt;]
  &gt;&gt;&gt; plt.show()
  </code></pre>
  
  <p>and as expected I get the chart one would expect, in a new window that has popped up, containing a very simple blue line going from 1 to 3 back to 1 again on y axis, with 0, 1, 2 as the x axis points (just as example). Now I close the graph window (using cross button in the top right under windows). This gives me control to the interpreter, and I start again, creating new objects:</p>
  
  <pre><code>&gt;&gt;&gt;
  &gt;&gt;&gt; fig1 = plt.figure()
  &gt;&gt;&gt; bx = fig1.add_subplot(111)
  &gt;&gt;&gt; bx.plot((1, 3, 1))
  [&lt;matplotlib.lines.Line2D object at 0x029E8210&gt;]
  &gt;&gt;&gt; plt.show()
  </code></pre>
  
  <p>This time though, I get a window frame, with nothing in it (just the frame, no white background nothing), and the whole bang shoot hangs. I have to "end task", the python interpreter is terminated by the system and I get a command prompt back. Similar behaviour on a mac (except it does actually plot the graph first, before also hanging). </p>
  
  <p>So somehow Python and/or matplotlib doesn't want me to close the window manually. Anybody know what's going on and what I should be doing? What I'd like to do is play around with different plots from within the interpreter, and obviously this behaviour doesn't help. I know I could use "Ipython -pylab" but in the interests of learning, I want to understand the above error. </p>
  
  <p>Thanks. </p>