C M wrote:
> Mark, Mark, Brendan, John, thanks for the input.  I have a related 
> question that may help to continue to clear things up for me.  My goal 
> is to use matplotlib with wxPython, and I've been able to embed graphs 
> in wxPython apps fine so far (in this case, directly, not using wxMPL).  
> What I wanted to know is whether it is necessary to use pylab or not.  I 
> am a little unclear what the purpose of pylab is in distinction to 
> matplotlib itself.  I gather that pylab is a way to sort of emulate 
> Matlab, but I am unclear as to whether I need to be using pylab in my 
> apps or not.  I am not doing scientific plots, just fairly simple 
> graphs, though I may throw some regression lines and r values on there 
> at some point. 
> 
> I really just want to keep things as simple as possible, and if I don't 
> need to use pylab, I'd rather not.  Any insight would be helpful.  Thank 
> you.
> Che M

No, you do not need to use pylab.  It provides an API that is concise, 
comfortable, and responsive, especially for interactive use. Even in 
scripts that are mostly written in OO fashion, use of a few pylab 
functions (e.g., figure, subplot, show) can simplify the code.  This 
does not apply if you are embedding mpl in wx, however; none of the 
examples/embedding_in_*.py demos import pylab.

In addition to its role as an alternative interface to mpl, pylab 
imports most of numpy and some additional functions, providing a 
somewhat matlab-like environment.  This can be handy for interactive work.

There is a range of opinion regarding pylab, but I think the center of 
the range is: don't use pylab when mpl is embedded; use it very 
sparingly for normal programming; and for interactive use, if it makes 
you more productive, use it as much as you want.

Eric

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to