Fernando and Eric have offered very nice explanations, but I have one 
thing to add:

Fernando Perez wrote:
> hopefully the responsibilities will be:
> 
> - ipython -> interactive work
> - numpy/scipy -> numerics
> - matploblib -> plotting

I sure hope so too.

> Following these ideas, in my personal use I normally do:
> 
> import numpy as N
> import scipy as S
> import pylab as P

I do something very similar - I really believe in namespaces, "import *" 
is a "bad idea".

However, I also try to avoid pylab altogether, in favor of:

import matplotlib as MPL,

MPL.PlottingStuff()

matplotlib provides the plotting functionality in a nice OO way. pylab 
is essentially a wrapper that provides a Matlab-like procedural 
interface to matplotlib. For me, one of the reasons I use python, rather 
than Matlab is that it is a richer, more feature-full language, 
including OO. Some folks think the procedural approach is better for 
interactive use, but I'm not so sure, and I'm quite sure that the OO 
approach is better for "real programs"

At this point, it isn't quite possible to use just matplotlib for 
interactive use, as pylab has the functionality to manage the figure 
windows, etc, so I do use a tiny bit of pylab there, but try to keep to 
the OO interface otherwise.

THe key stumbling block is docs -- most of the docs and tutorials use 
the pylab interface, so it's a bit harder to figure out what to do. This 
should help get you started:

http://sourceforge.net/mailarchive/message.php?msg_id=11033442

(Did that ever get up on the Wiki?, and/or does anyone have other pointers?)

-Chris



-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[EMAIL PROTECTED]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to