title: Matplotlib: how to show a figure that has been closed
body: <p>I have a function which returns a <code>Figure</code> created with <code>pyplot</code>. This function closes the figure before returning it. If I didn't close it, showing it would be very easy with just <code>plt.show()</code>, but let us assume I cannot do that.</p>
  
  <p>I can easily save the returned <code>Figure</code> to a file, but I cannot find the way to display it (i.e.: have a popped window showing the figure).</p>
  
  <pre><code>from matplotlib import pyplot as plt                                                
  
  
  def new_figure():                                                                   
      fig = plt.figure()                                                              
      plt.plot([0, 1], [2, 3])                                                        
      plt.close(fig)                                                                  
      return fig                                                                      
  
  
  fig = new_figure()                                                                  
  fig.savefig('output.svg')                                                           
  fig.show()
  </code></pre>
  
  <p>How could I show the figure?</p>