Briefly, is there a way to get a callback in the event that the canvas has been redrawn (e.g. from a zoom or pan)?

matplotlib 0.86.2
python 2.4.1
wxPython 2.6.2.1
Mac OS X.4.7

I draw a circle at a certain point. I let the user drag that point to a new location. However, if the plot is redrawn for any reason, I have to redraw my circle in a new position. I can't seem to find any way to get notified of a redraw.

Figure.add_axobserver() isn't fully implemented as far as I can tell since it only notifies for a artist deletion or a call to sca(). Axes.connect() doesn't work either because there's no way to set emit in a class-wide scope and consequently calls made to set_xlim made by the toolbar do not trigger an event because they lack the emit keyword in their calls. Here's the relevant code from axes.py.

  def set_xlim(self, *args, **kwargs):
        # .....
        emit = popd(kwargs, 'emit', False)
        # .....
        if emit: self._send_xlim_event()
        return vmin, vmax

I've been trying to accomplish this without editing matplotlib package code. Is there a way I could override Axes.set_xlim() in order to insert "emit=True" into the arguments?

Maybe there's a better way to do what I'm doing?


Thanks,

R.

Attachment: PGP.sig
Description: This is a digitally signed message part

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to