On Thu, Feb 12, 2009 at 2:13 PM, Ryan May <rma...@gmail.com> wrote:
> On Wed, Feb 11, 2009 at 7:30 PM, John Hunter <jdh2...@gmail.com> wrote:
>>
>> On Wed, Feb 11, 2009 at 2:49 PM, Ryan May <rma...@gmail.com> wrote:

> Well, I checked in an example that shows the functionality.  The problem is
> that using these events doesn't follow the standard event API.  You don't
> connect using figure.canvas.mpl_connect() (it doesn't like the names
> 'xlim_changed' and 'ylim_changed'), but rather you use
> Axes.callbacks.connect().  Also, the an event object is not passed into the
> callback, but rather the originating axes instance.  Are these events relics
> to the older version of event handling that haven't been moved to the
> present?
>
> Otherwise, should I add a special section to the event handling docs to
> handle these?


Thanks for the example -- you are right that this is a 'legacy' event
callback outside the regular event framework.  So it doesn't really
belong in the event handling chapter but may merit a quick note there.
 Alternatively, we could rather easily draft up a special event
(NavigationEvent?)  that *does* work in the regular event handling
framework.  The quirk is that the events are handled at the canvas
level, so it would be difficult to register for a single axes, but one
could get a NavigationEvent if the limits of any of the axes in the
figure were updated, and use the inaxes attribute to process it.  If
this, or some variant of it, seems like a good idea I'm happy to add
it.

JDH

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to