Quantcast

pylab

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

pylab

marc desmarais-2
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


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pylab

Eric Firing
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pylab

Sebastian Haase-3
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<[hidden email]> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pylab

Tom K.

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 ?


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pylab

John [H2O]
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!


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pylab

John Hunter-4
On Tue, Aug 11, 2009 at 12:28 PM, John [H2O]<[hidden email]> wrote:
>
> Just an thought regarding the whole PyLab concept...

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

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pylab

Eric Firing
In reply to this post by marc desmarais-2
marc desmarais wrote:
> I found a typo at
> "http://matplotlib.sourceforge.net/users/navigation_toolbar.html"
>
> "If you press ‘x’ or ‘y’ while panning the motion will be contrained to
> the x or y axis, respectively."
>

Thank you.  Now it is fixed.

> BTW, do you know how to constrain the panning function to left/right
> programmatically? I'm try to make a logic analyzer.

I don't know offhand, but I don't think that capability is in place.  I
find holding down a key while panning to be a bit awkward, so I am also
interested in alternatives.

>
> Finally, is this the best place to post my questions? (I suspect not...)

Yes, matplotlib-users is the right place.  I assume you intended to
"reply-to-all" on that last one, so intended it to go to the list.
Apparently the settings on this list are unusual in that one must
explicitly "reply-to-all"; it is not automatic that one's reply goes to
the list.

Eric

>
> --- On *Mon, 8/10/09, Eric Firing /<[hidden email]>/* wrote:
>
>
>     From: Eric Firing <[hidden email]>
>     Subject: Re: [Matplotlib-users] pylab
>     To: "marc desmarais" <[hidden email]>
>     Cc: [hidden email]
>     Date: Monday, August 10, 2009, 7:22 PM
>
>     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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pylab (drag_pan )

marc desmarais-2
To create a cursor that only pans horizontally, I'm thinking of writing a special version of drag_pan in  backend_bases.py  It would call  drag_pan in axes.py with the key argument set to 'x'

Any advice, suggestions?


backend_bases.py :

def my_drag_pan(self, event):
    'the drag callback in pan/zoom mode'

    for a, ind in self._xypress:
        a.drag_pan(self._button_pressed, 'x', event.x, event.y)
    self.dynamic_update()
   
#
# In axes, up/down motion is prevented when the 'x' key is down
#
axes.py

def drag_pan(self, button, key, x, y):
   ...
   elif key=='x':
                dy = 0
    ...

Marc Desmarais
Long Beach, CA, 90814

--- On Wed, 8/12/09, Eric Firing <[hidden email]> wrote:

From: Eric Firing <[hidden email]>
Subject: Re: [Matplotlib-users] pylab
To: "marc desmarais" <[hidden email]>
Cc: "matplotlib-users" <[hidden email]>
Date: Wednesday, August 12, 2009, 9:59 AM

marc desmarais wrote:
> I found a typo at "http://matplotlib.sourceforge.net/users/navigation_toolbar.html"
>
> "If you press ‘x’ or ‘y’ while panning the motion will be contrained to the x or y axis, respectively."
>

Thank you.  Now it is fixed.

> BTW, do you know how to constrain the panning function to left/right programmatically? I'm try to make a logic analyzer.

I don't know offhand, but I don't think that capability is in place.  I find holding down a key while panning to be a bit awkward, so I am also interested in alternatives.

>
> Finally, is this the best place to post my questions? (I suspect not...)

Yes, matplotlib-users is the right place.  I assume you intended to "reply-to-all" on that last one, so intended it to go to the list. Apparently the settings on this list are unusual in that one must explicitly "reply-to-all"; it is not automatic that one's reply goes to the list.

Eric

>
> --- On *Mon, 8/10/09, Eric Firing /<efiring@...>/* wrote:
>
>
>     From: Eric Firing <efiring@...>
>     Subject: Re: [Matplotlib-users] pylab
>     To: "marc desmarais" <mdesm2005@...>
>     Cc: matplotlib-users@...
>     Date: Monday, August 10, 2009, 7:22 PM
>
>     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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: pylab (drag_pan )

lrq3000
This post has NOT been accepted by the mailing list yet.
Hello,

Is there any news about this project?

I've read the proposition and it is very interesting.

I wish the author the best for his endeavours in this project.
Loading...