I updated to the newest release of OS X---10.6.2---last night and I've been getting a weird windowing error for certain backends.
I'm able to reproduce the error with the following: run a simple plot script (which calls plt.show) from the terminal. Close the figure. The problem is:
* tkagg: window closes, but it doesn't return control to the terminal (i.e. terminal hangs).
* macosx: axis is cleared from the figure window, but the window (w/o axis) remains and terminal hangs.
* qt4agg: works fine.
Alternatively, I can run the script from ipython. In this case, tkagg and qt4agg work as normal. The macosx backend hangs, the window does not close, and control is not returned to ipython.
In all cases, the plot shows up fine (it just doesn't always close properly). Running the script with python -vv doesn't help: All the debug code it prints stops before plt.show is called. I wish I could provide more debug output, but I'm not sure how.
PS. To add another piece to the mystery, I've been having problems running plot scripts from my text editor (Textmate): python hangs **before** plotting. I've traced the hang to a call to matplotlib.backends.pylab_setup.new_figure_manager, but I really don't understand where exactly hangs. Again: this only happens when running from Textmate, and started happening about a week ago (following a Textmate update). My guess is that this is a Textmate-related issue, but I thought I'd mention it in case these two issues combined suggest a more fundamental problem with my python install.