My platform is as follows
Centos 6.x (VirtualBox VM running on Win-7 host), Python 2.6.6, Matplotlib 1.3.1, Numpy 1.8.0, Scipy 0.14.0.dev-bb608ba
I am runnin
The first step in debugging this is to replace plt.show() by plt.savefig('foo.png'). If it works, the problem is most probably with the backend:
>>> import matplotlib
>>> matplotlib.get_backend()
'Qt4Agg'
Try switching backends and see if that helps: How to switch backends in matplotlib / Python
If that does not help either, make sure you have all the dependencies (http://matplotlib.org/users/installing.html) --- I'd just reinstall from source. (not pip install matplotlib)
I once had a similar problem. I solved it by adding these lines imediately after import matplotlib.pyplot as plt and after every subsequent plt.show():
plt.clf()
plt.cla()
plt.close()
I am having the exact same problem. However, this was my fix after a little bit of research:
sudo yum install PyQt4
sudo gedit file at mpl.matplotlib_fname()
Change the first and only uncommented setting (as default) at line 32:
backend : Qt4Agg