John Hunter-4 wrote:
> 
> 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
> 

Hi,

Since matplotlib is about to hit 0.99, I am bringing up an old discussion
about the 'callback' events 'xlim_changed' and 'ylim_changed' which are only
available through the

callbacks.connect('xlim_changed',dostuff)

API. Is there now a way to do this through the 'standard' mpl_connect() API?
If not, would it be easy to implement this?

Thanks,

Tom

-- 
View this message in context: 
http://www.nabble.com/executing-function-when-view-interval-changes-tp21963695p24772257.html
Sent from the matplotlib - users mailing list archive at Nabble.com.


------------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to