title: Matplotlib backend lets me either have interactive window or use pyplot.close('all') withouth an error
body: <p>I am using ipython with python3.4 via a virtualenv and had to change matplotlib's backend in order to have the interactive plotting window show up. But when I try to plot not in the ipython shell but import a script that does the plotting for me, I can not use pyplot.close('all') (therefore multiple open windows are lingering in the back that can be open with plt.show())without getting the error:</p>
  
  <pre><code>can't invoke "event" command: application has been destroyed
      while executing
  "event generate $w &lt;&lt;ThemeChanged&gt;&gt;"
      (procedure "ttk::ThemeChanged" line 6)
      invoked from within
  "ttk::ThemeChanged"
  </code></pre>
  
  <p>I can get rid of this behavior by explicitly using matplotlib.use('agg') but then pyplot.show() is of course not working anymore. I guess i fundamentally do not understand how to choose an appropriate backend. When I use matplotlib.get_backend() it gives me 'TKAgg'.</p>
  
  <p>Is it possible to be able to close windows in a script while being able to open interactive windows or is this behavior generally not wanted?</p>