Jupyter (IPython) notebook not plotting

匿名 (未验证) 提交于 2019-12-03 01:23:02

问题:

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" 

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". 

What should I do?

回答1:

I believe the pylab magic was removed when they transitioned from IPython to a more general Jupyter notebook.

Try:

%matplotlib inline 

Also when you get a message like:

"matplotlib.axes._subplots.AxesSubplot at 0xebf8b70". 

That's just IPython displaying the object. You need to specify IPython display it. Hence the matplotlib inline magic.



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!