我安装了 anaconda 来使用 pandas 和 scipy。我正在阅读和观看 pandas 教程,他们都说要使用打开 ipython 笔记本
ipython notebook --pylab==inline
但是当我这样做时,我会收到一条消息说
"Support for specifying --pylab on the command line has been removed. Please use '%pylab = inline' or '%matplotlib =inline' in the notebook itself"
但这不起作用。然后,当我尝试“plot(arange(10))”时,我收到一条消息,说“name 'plot' is not defined”。我尝试从 .csv 文件中绘制数据并得到
"matplotlib.axes._subplots.AxesSubplot at 0xebf8b70".
我该怎么办?
最佳答案
我相信当他们从 IPython 过渡到更通用的 Jupyter notebook 时,pylab 的魔力已经消失了。
试试:
%matplotlib inline
当您收到如下消息时:
"matplotlib.axes._subplots.AxesSubplot at 0xebf8b70".
这只是 IPython 显示对象。您需要指定 IPython 显示它。因此 matplotlib 内联魔法。
关于python - Jupyter(IPython)笔记本不绘图,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31609600/