in Ipython / Jupyter notepad, Pandas doesn't display the graph I'm trying to build

I am trying to build some data using pandas in an Ipython Notebook, and while it gives me an object, it does not actually display a graph. So it looks like this:

In [7]: pledge.Amount.plot() Out[7]: <matplotlib.axes.AxesSubplot at 0x9397c6c> 

After that, the schedule should follow, but it just does not appear. I imported matplotlib, so no problem. Is there any other module I need to import?

+95
python pandas ipython jupyter-notebook
May 9 '12 at 6:45
source share
6 answers

Note that --pylab is deprecated and has been removed from newer IPython assemblies. The recommended way to enable inline printing in an IPython notebook:

 %matplotlib inline import matplotlib.pyplot as plt 

See this post from the ipython-dev mailing list for more details.

+166
May 28 '14 at 1:47
source share

Change: Pylab is deprecated, please see the current accepted answer

Well, it seems the answer is to start the ipython laptop with --pylab = inline. so ipython notebook --pylab = inline This does what I saw earlier and what I wanted it to do. Sorry for the vague original question.

+50
May 9 '12 at 7:24
source share

With import matplotlib.pyplot as plt just add

 plt.show() 

and it will display all saved graphs.

+25
May 9 '12 at 7:00
source share

just after importing matplotlib you do one magic if you started ipython as if it

 ipython notebook %matplotlib inline 

run this command, everything will be perfectly shown

+4
Jun 28 '15 at 15:14
source share

start ipython with ipython notebook --pylab inline , then the graph will display a line.

+1
Feb 01 '15 at 2:07
source share

All you have to do is import matplotlib.

 import matplotlib.pyplot as plt 
-four
Nov 02 '15 at 19:02
source share



All Articles