使用:如何使用matplotlib在python中保存繪圖?
In [42]: tz_counts[:10].plot(kind='barh', rot=0)
它返回:
Out[42]: <matplotlib.axes._subplots.AxesSubplot at 0x7fa216b464d0>
但我不能看到任何文件,也沒有顯示任何。
我今天開始學習python。 有人可以幫我嗎?
使用:如何使用matplotlib在python中保存繪圖?
In [42]: tz_counts[:10].plot(kind='barh', rot=0)
它返回:
Out[42]: <matplotlib.axes._subplots.AxesSubplot at 0x7fa216b464d0>
但我不能看到任何文件,也沒有顯示任何。
我今天開始學習python。 有人可以幫我嗎?
您嘗試保存的情節作爲形象?像一個PNG? – JuanPablo
http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.savefig – JuanPablo