[IPython-dev] A request for help reviewing/testing a branch
John Hunter
jdh2358 at gmail.com
Sat Jan 9 23:12:03 EST 2010
On Sat, Jan 9, 2010 at 9:57 PM, Fernando Perez <fperez.net at gmail.com> wrote:
> On Sat, Jan 9, 2010 at 7:53 PM, John Hunter <jdh2358 at gmail.com> wrote:
>> OK, that worked. The following worked for me using svn mpl and your
>> ipy branch (line 6 generated a plot)-- nice work!
>
> Great, thanks! This is on ubuntu, right?
Yes Karmic (9.10)
>> NameError: name 'pylab' is not defined
>
> BTW, since it's a magic, typing
>
> pylab?
> will give you info (help doesn't know anything about magics).
Ahh that is good to know. I wasn't aware that "help" in ipython did
not have the extra functionality of "?" and was wondering why the
magic "pylab" had no docs before loaded.... Thanks for the
clarification.
I was also able to test this with the default ubuntu 9.10 mpl and it
worked fine. Backend switching does not appear to work with "%pylab
qt" and then "%pylab wx" or "%pylab tk" but I had read in a previous
thread that there should be some limited support for backend
switching.... What is the status here?
msierig at pinchiepie:~$ PYTHONPATH=~/dev/lib/python2.6/site-packages/
~/dev/bin/ipython
Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
Type "copyright", "credits" or "license" for more information.
IPython 0.11.bzr.r1219 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: %pylab qt
Welcome to pylab, a matplotlib-based Python environment [backend: Qt4Agg].
For more information, type 'help(pylab)'.
In [2]: plot([1,2,3])
Out[2]: [<matplotlib.lines.Line2D object at 0xab4d0cc>]
In [3]: %pylab tk
/usr/lib/pymodules/python2.6/matplotlib/__init__.py:835: UserWarning:
This call to matplotlib.use() has no effect
because the the backend has already been chosen;
matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.
if warn: warnings.warn(_use_error_msg)
Welcome to pylab, a matplotlib-based Python environment [backend: TkAgg].
For more information, type 'help(pylab)'.
In [4]: figure()
Out[4]: <matplotlib.figure.Figure object at 0xaeaa0cc>
In [5]: matplotlib.rcParams['backend']
Out[5]: 'Qt4Agg'
In [6]:
JDH
More information about the IPython-dev
mailing list