I'm new to python scientific computing, and I tried to make a simple graph on IPython notebook.
import pandas
plot(arange(10))
Then error had shown as below.
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-2-6b139d572bd6> in <module>()
1 import pandas
----> 2 plot(arange(10))
NameError: name 'plot' is not defined
Instead, with IPython --pylab mode, a right graph popped up when I tried the same code.
Am I missing any environment?
My environment is Mac OSX 10.8.5, python 2.7.5, IPython 1.1.0, matplotlib 1.3.1, and pandas 0.12.0. I downloaded python scientific environment by Anaconda installer from continuum.io. Anaconda version is the newest one as of 1/30/2014.
It is not advisable to use
pylab
mode. See the following post from Matthias BussonnierA summary from that post:
Why not to use
pylab
flag:You are much better by doing the following inside your IPython notebook.
The following is the code which
--pylab
brings into the namespaceStill, if you wish to use
pylab
and have plots inline, you may do either of the following:From shell:
Or, from within your notebook