pylab

Are there still two pylabs? Are the following two web pages referring to the same pylab?

http://www.scipy.org/PyLab
http://matplotlib.sourceforge.net/

I’m a bit confused (trying to get the Scipy, Numpy, Pylab, Matplolib story straight, before I plunge in)

Marc Desmarais

Long Beach, CA, 90814

marc desmarais wrote:

Are there still two pylabs? Are the following two web pages referring to the same pylab?

Not exactly:

This one is a vision or proposal, open for discussion:

http://www.scipy.org/PyLab

This one is real:

http://matplotlib.sourceforge.net/

The pylab interface to the matplotlib plotting library has some of the characteristics the author of the first link is talking about, but the trend has been away from some aspects of that vision, not towards it.

For more about the real pylab, see http://matplotlib.sourceforge.net/faq/usage_faq.html#matplotlib-pylab-and-pyplot-how-are-they-related

I'm a bit confused (trying to get the Scipy, Numpy, Pylab, Matplolib story straight, before I plunge in)

Numpy is the common core, providing N-dimensional arrays and math; matplotlib is a plotting library, using numpy; scipy is a collection of math/science functionality, also using numpy.

But don't forget ipython, which provides a nice interactive shell:
http://ipython.scipy.org/moin/

Eric

···

Marc Desmarais
Long Beach, CA, 90814

Thanks for the info -- very informative -- maybe this post could be
somehow added or linked to from http://www.scipy.org/PyLab

-- Sebastian Haase

···

On Tue, Aug 11, 2009 at 4:22 AM, Eric Firing<efiring@...202...> wrote:

marc desmarais wrote:

Are there still two pylabs? Are the following two web pages referring
to the same pylab?

Not exactly:

This one is a vision or proposal, open for discussion:

http://www.scipy.org/PyLab

This one is real:

http://matplotlib.sourceforge.net/

The pylab interface to the matplotlib plotting library has some of the
characteristics the author of the first link is talking about, but the
trend has been away from some aspects of that vision, not towards it.

For more about the real pylab, see
http://matplotlib.sourceforge.net/faq/usage_faq.html#matplotlib-pylab-and-pyplot-how-are-they-related

I'm a bit confused (trying to get the Scipy, Numpy, Pylab, Matplolib
story straight, before I plunge in)

Numpy is the common core, providing N-dimensional arrays and math;
matplotlib is a plotting library, using numpy; scipy is a collection of
math/science functionality, also using numpy.

But don't forget ipython, which provides a nice interactive shell:
http://ipython.scipy.org/moin/

Eric

Marc Desmarais
Long Beach, CA, 90814

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Sebastian Haase-3 wrote:

Thanks for the info -- very informative -- maybe this post could be
somehow added or linked to from http://www.scipy.org/PyLab

-- Sebastian Haase

Sebastian - I've done as you suggest... I added a link to this post on
nabble - do you think there is a better URL for it than
   http://www.nabble.com/pylab-td24910613.html ?

···

--
View this message in context: http://www.nabble.com/pylab-tp24910613p24914380.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

Just an thought regarding the whole PyLab concept...

import this

The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
[snip]...
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

I have to agree...

When I started to work with Python, I used "from pylab import *" all too
often, eventually I realized I didn't know where things were coming from.
Documentation has recently improved greatly, but still, it's nice to know
what's driving the functions/classes you are working with.

Python is a great tool for <your application here>. The modules matplotlib,
numpy, scipy, etc.. will also undoubtedly find their place in more than just
a 'pylab' environment. Having taught others a little about python, I can say
the use of "from pylab import *" definitely resulted in confusion down the
road...

For the Original Poster, I would offer this advice. Use Ipython with your
own profile. Make sure you maintain namespaces, such that you call:
import numpy as np
import matplotlib as mpl
import scipy as sp
etc...

See here for creating profiles:
http://ipython.scipy.org/doc/manual/html/config/customization.html

Using the namespaces results in significantly more clarity at the cost of a
few extra keystrokes. (People will have opinions on this)

Then, once working in Ipython... I always keep (at least) these pages handy:
http://docs.scipy.org/doc/numpy/reference/index.html
http://docs.scipy.org/doc/scipy/reference/index.html
http://matplotlib.sourceforge.net/api/index.html

Good luck!

···

--
View this message in context: http://www.nabble.com/pylab-tp24910613p24922147.html
Sent from the matplotlib - users mailing list archive at Nabble.com.

If you would like to frame this as a FAQ "Should I import * from
pylab?" and post it as a rest svn diff against doc/faq/howto_faq.rst,
I would be happy to include this on the website

http://matplotlib.sourceforge.net/faq/howto_faq.html#contributing-howto

JDH

···

On Tue, Aug 11, 2009 at 12:28 PM, John [H2O]<washakie@...287...> wrote:

Just an thought regarding the whole PyLab concept...