[SciPy-User] Some interactive Python tutorials on basic stats, possibly useful for teaching

Raj rajeev.raizada at gmail.com
Fri Feb 18 14:43:34 EST 2011


On Feb 17, 4:12 pm, Christopher Barker <Chris.Bar... at noaa.gov> wrote:
> > Matplotlib GUIs appear to run slightly differently on Linux
> > depending upon which backend is being used,
> > and I don't know enough to know whether this ion() command
> > would help to make the scripts' behavior either
> > more consistent or less consistent across various backends.
>
> nope, that's a separate issue.
>
> > Also, I don't know enough to know whether the ion() command
> > ends up having the same effect as running the scripts
> > from an "ipython -pylab" session.
>
> nope -- ipython's "pylab" mode mostly has to do with how ipython
> interacts with the mainloop of the GUI backend, though it also sets up
> matplotlib for you, perhaps turning on interactive mode.

Dear Chris,

Many thanks indeed for your help explaining ion() and -pylab.

On a Python-for-education list, John Posner suggested that inserting
a pylab.draw() command into the code fixes the problem for him,
in a different Python setup:
http://mail.python.org/pipermail/edu-sig/2011-February/010193.html

Following his suggestion, I've tried inserting a couple of
pylab.draw() commands,
and it appears to help, and also not to have any unwanted side-
effects.

I would be very interested to hear from people
whether the new versions of the code with the pylab.draw() commands
works properly now with various Matplotlib backends on Linux,
without needing to do the "ipython -pylab" workaround.
e.g.
http://www.dartmouth.edu/~raj/Python/interactive_mean_std_normal_distribution.py

Thanks again for your help,

Raj



More information about the SciPy-User mailing list