[Tutor] plotting with python

Kent Johnson kent37 at tds.net
Fri Mar 27 13:47:47 CET 2009


On Fri, Mar 27, 2009 at 7:46 AM, Bala subramanian
<bala.biophysics at gmail.com> wrote:
> Friends,
> I am not sure if this forum is appropriate to ask question about a
> particular package. After getting suggestions from some of you for python
> based plotting, I have just started with matplotlib. I am bit confused with
> the relation between matplotlib and pylab.
>
> In the matplotlib homepage, example plots are shown with both
> matplotlib.pyplot and pylab. Inaddition within matplotlib, there is a module
> called matplotlib.pylab
>
> i) matplotlib and pylab -> both are same or different modules ?. Is there
> any advantage of using one over the other ?
>
> ii) Is it like i can plot the graphs with both matplotlib and pylab ?

IIUC, pylab is part of matplotlib. It provides a simplified,
functional (not object-oriented) interface to matplotlib. Using
matplotlib directly gives you more control over the result.

> iii) can some kindly show me an example of ploting multy Y axes plot, ie NXY.
Take a look at the gallery for something similar to what you want.
Clicking on a gallery image will show you a larger image and the code
that created it.
http://matplotlib.sourceforge.net/gallery.html

Kent


More information about the Tutor mailing list