我在mac上使用的是Ensided32位python发行版。
如果我尝试:
$ ipython
In [1] from pylab import *
In [2] ion()
In [3] plot([1,2],[1,2])图形已创建,但python在尝试绘图时冻结。
是我做错了什么,还是这是个bug?
在ipython --pylab中运行绘图可以正常工作
发布于 2012-10-11 05:38:10
我使用的是'WXAgg‘后端,我切换到了'macosx’这似乎解决了这个问题
In [1]: import matplotlib
In [2]: matplotlib.get_backend()
Out[2]: 'WXAgg'
In [3]: matplotlib.use('macosx')
In [4]: matplotlib.get_backend()
Out[4]: 'MacOSX'
In [5]: from pylab import *
In [6]: ion()
In [7]: plot([1,2]) # now works finehttps://stackoverflow.com/questions/12827969
复制相似问题