Jupyter(IPython)笔记本没有密谋
我安装了anaconda来使用pandas和scipy。我阅读和观看熊猫教程,他们都说使用
I installed anaconda to use pandas and scipy. I reading and watching pandas tutorials and they all say to open the ipython notebook using
ipython notebook --pylab==inline
但是当我这样做时,我收到一条消息说
but when I do that I get a message saying
"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))时,我收到一条消息,说名称'情节'没有定义。我尝试从.csv文件中绘制数据并获得
But that does not work. Then when I try "plot(arange(10))" I get a message saying "name 'plot' is not defined." I trying plotting data from a .csv file and got
"matplotlib.axes._subplots.AxesSubplot at 0xebf8b70".
我该怎么办?
我相信当他们从IPython转换到更普通的Jupyter笔记本时,pylab魔法被移除了。
I believe the pylab magic was removed when they transitioned from IPython to a more general Jupyter notebook.
尝试:
%matplotlib inline
此外,当您收到如下消息时:
Also when you get a message like:
"matplotlib.axes._subplots.AxesSubplot at 0xebf8b70".
这只是显示对象的IPython。你需要指定IPython显示它。因此matplotlib内联魔术。
That's just IPython displaying the object. You need to specify IPython display it. Hence the matplotlib inline magic.