Re: [Matplotlib-users] Memory leak; user error or bug?

2010-12-01 Thread Daniel Hyams
23 MB RPRVT @ 7:52 PM
40 MB RPRVT @ 8:07 PM

matplotlib 1.0.0
OSX 10.6.5
python.org python, 2.6.6


On Wed, Dec 1, 2010 at 6:53 PM, Russell E. Owen  wrote:

> In article <4cf69ba4.1000...@stsci.edu>,
>  Michael Droettboom 
>  wrote:
>
> > On 12/01/2010 01:40 PM, Russell E. Owen wrote:
> > > I'm seeing a nasty memory leak in my strip chart widget using
> matplotlib
> > > 1.0, TkAgg and Mac OS X 10.5
> > >
> > > I've posted a minimal version here:
> > > <
> http://www.astro.washington.edu/users/rowen/python/MinimalStripChartWdg.
> > > py>
> > >
> > > It doesn't seem to matter if I use the animation API or not (the
> example
> > > does not).
> > >
> > > Any ideas? If this is a bug I'll report it, but I hope I'm just doing
> > > something wrong.
> > I don't have a Mac to try this on -- however, I don't see the leak on
> > Fedora 14/Python 2.7/Numpy 1.5.1/Tkinter with both matplotlib 1.0 and
> > matplotlib SVN head.  That may narrow it down to something Mac OS
> > X-specific.  Sorry that's not totally helpful, but it's a data point.
>
> Thank you; that is very helpful. Unfortunately that suggests it is
> Mac-specific or Tcl/Tk-version-specific which could make it hard to
> track down. I'll report it as a bug in any case.
>
> -- Russell
>
>
>
> --
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>



-- 
Daniel Hyams
dhy...@gmail.com
--
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Memory leak; user error or bug?

2010-12-01 Thread Russell E. Owen
In article <4cf69ba4.1000...@stsci.edu>,
 Michael Droettboom  
 wrote:

> On 12/01/2010 01:40 PM, Russell E. Owen wrote:
> > I'm seeing a nasty memory leak in my strip chart widget using matplotlib
> > 1.0, TkAgg and Mac OS X 10.5
> >
> > I've posted a minimal version here:
> >  > py>
> >
> > It doesn't seem to matter if I use the animation API or not (the example
> > does not).
> >
> > Any ideas? If this is a bug I'll report it, but I hope I'm just doing
> > something wrong.
> I don't have a Mac to try this on -- however, I don't see the leak on 
> Fedora 14/Python 2.7/Numpy 1.5.1/Tkinter with both matplotlib 1.0 and 
> matplotlib SVN head.  That may narrow it down to something Mac OS 
> X-specific.  Sorry that's not totally helpful, but it's a data point.

Thank you; that is very helpful. Unfortunately that suggests it is 
Mac-specific or Tcl/Tk-version-specific which could make it hard to 
track down. I'll report it as a bug in any case.

-- Russell


--
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Memory leak; user error or bug?

2010-12-01 Thread Michael Droettboom
On 12/01/2010 01:40 PM, Russell E. Owen wrote:
> I'm seeing a nasty memory leak in my strip chart widget using matplotlib
> 1.0, TkAgg and Mac OS X 10.5
>
> I've posted a minimal version here:
>  py>
>
> It doesn't seem to matter if I use the animation API or not (the example
> does not).
>
> Any ideas? If this is a bug I'll report it, but I hope I'm just doing
> something wrong.
I don't have a Mac to try this on -- however, I don't see the leak on 
Fedora 14/Python 2.7/Numpy 1.5.1/Tkinter with both matplotlib 1.0 and 
matplotlib SVN head.  That may narrow it down to something Mac OS 
X-specific.  Sorry that's not totally helpful, but it's a data point.

Mike

--
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Memory leak; user error or bug?

2010-12-01 Thread Russell E. Owen
I'm seeing a nasty memory leak in my strip chart widget using matplotlib 
1.0, TkAgg and Mac OS X 10.5

I've posted a minimal version here:


It doesn't seem to matter if I use the animation API or not (the example 
does not).

Any ideas? If this is a bug I'll report it, but I hope I'm just doing 
something wrong.

-- Russell


--
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Limit legend to visible data

2010-12-01 Thread Justin McCann
Is there a straightforward way to limit the legend only to lines that
appear within the current display limits? I have a plot that has too
many separate data series to show on the legend at once, but once I
zoom in it would be good to re-set the legend to show only the visible
data points/lines.

I guess the way to do that is:

- catch the DrawEvent
- call get_xlim() and get_ylim() to get the new bounds
- figure out which lines are within the bounds and add them to a new
legend. I could run through each line and compare xlim/ylim with
line.get_xydata(); is there already a function to do this?

Thanks for your help,
Justin

--
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] subclassing AutoDateFormatter correctly

2010-12-01 Thread C M
On Wed, Dec 1, 2010 at 12:28 AM, Ryan May  wrote:

> On Tue, Nov 30, 2010 at 7:00 PM, C M  wrote:
> > Thanks, Ryan.  I've done that now.  I use the OOP approach to matplotlib
> and
> > embed it in wxPython, so my example uses that.  I did not know how to
> apply
> > an AutoDateFormatter to an axis if using pylab and figured the basics of
> > what I am trying to do are apparent from this sample.
> >
> > The sample is attached.  The point of it is that, despite it apparently
> > using my AutoDateFormatter, all the dates at all levels of zoom are %Y
> (e.g.
> > "2010").  This is because in the AutoDateFormatter subclass, the line:
> >
> > scale = float( self._locator._get_unit() )
> >
> > is *always* returning 365.0.
> >
> > I am not bothering for now to include the business about how
> point-picking
> > remedies my problem, because the AutoDateFormatter shouldn't need
> > that--obviously, the way I am doing it is wrong, and I'd like to know
> what
> > it is.
>
> I'm guessing your problem was that only the year was being shown,
> regardless? It would seem the problem stems from the fact that while
> you give your formatter the AutoDateLocator, you never tell the axis
> to use this. I got what I considered the correct behavior by adding
> the following line at linen 84 in the script:
>
>   self.subplot.xaxis.set_major_locator(adl)
>
> Does adding that get you what you want?
>
> Ryan
>
>
Yes, that was it!  So simple, but I've been confused about how locators and
formatters work together--now it makes much more sense.  Thank you very
much.

Che
--
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] How by clicking an axes label open a dialog?

2010-12-01 Thread Matthias Michler
On Thursday September 9 2010 20:33:03 sa6113 wrote:
> I want to use backendQtAgg inorder to imbed plot dialog into basic dialog
> and by clicking the labels open plot option.
> I couldn't use 'motion_notify_event' because the event only handles into
> plot area not in canvas area!!!
> anybody knows?

Hi,

maybe your problem was solved meanwhile, but if not I've got an idea about it. 
I think you have to adapt the framework used in the widgets.py defining the 
class CheckButtons. There one connects the button_press_event to a method 
_clicked and in this method it is checked wheter or not the click was inside 
the area associated with the label
t.get_window_extent().contains(event.x, event.y)

I admit my late reply, but maybe it is useful anyway.

Kind regards,
Matthias

--
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users