python2.7之matplotlib中plt.show()不显示图的解决办法

最近,我从新安装了ubuntu,使用virtualenv安装了matplotlib。而后,问题来了。当我运行下列代码时,没有图框跳出来。 import matplotlib.pyplot as plt plt.show() plt.bar(left = 0,height = 1) 缘由python 我使用%pylab查看matplotlib后端,发现竟然是agg。兄弟姐妹们,agg是不会画图的!
相关文章
相关标签/搜索