python - pandas plot 在 ipython notebook 中不显示为内联

标签 python matplotlib pandas plot ipython-notebook

我试图在 ipython 笔记本内联中绘制图形,但是 .plot() 方法只显示对象信息,如

<matplotlib.axes._subplots.AxesSubplot at 0x10d8740d0>

但没有图表。我也可以用 plt.show() 让它显示图表,但我想内联。所以我尝试了 %matplotlib inlineipython 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/

相关文章:

python - 在不显式定义梯度的情况下优化 scipy 中的函数

python - 使用 Python 生成报告 : PDF or HTML to PDF

python - 不同参数的多个散点图 - Python

python : Comparing values between rows and columns

python - Python 嵌套字典中的内部值无缘无故地发生变化

python - 将 SQL 查询存储在字典中?

python - S3 响应错误 : 100 Continue - python (appengine)

python - 如何在airflow中设置多个Dag目录

python - 如何在matplotlib中填充分散区域?

python - 使用 MatPlotLib,如何将自动缩放 Axis 从一个图形应用到另一个图形?