我试图在 ipython 笔记本内联中绘制图形,但是 .plot()
方法只显示对象信息,如
<matplotlib.axes._subplots.AxesSubplot at 0x10d8740d0>
但没有图表。我也可以用 plt.show()
让它显示图表,但我想内联。所以我尝试了 %matplotlib inline
和 ipython notebook --matplotlib=inline
,但没有帮助。
如果我使用 %matplotlib inline
,则 .plot()
显示
/Users/<username>/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/IPython/core/formatters.py:239:
FormatterWarning: Exception in image/png formatter: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128) FormatterWarning,
并使用 ipython notebook --matplotlib=inline
显示相同。
最佳答案
改变
ipython notebook --matplotlib=inline
到
ipython notebook --matplotlib inline
注意没有 =
符号。
关于python - pandas plot 在 ipython notebook 中不显示为内联,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28384951/