Neil Crighton wrote: > I noticed on the event handling doc page: > > matplotlib-devel@lists.sourceforge.net > > that the draggable rectangle example doesn't work in version 0.98.3. > The rectangle class no longer seems to have the xy property. If you > replace the current on_press() method in the example with the code > below it seem to work. > > def on_press(self, event): > 'on button press we will see if the mouse is over us and store > some data' > if event.inaxes != self.rect.axes: return > > contains, attrd = self.rect.contains(event) > if not contains: return > xy = self.rect.get_x(),self.rect.get_y() > print 'event contains', xy > x0, y0 = xy > self.press = x0, y0, event.xdata, event.ydata >
Good catch. I checked in a slightly different version of the fix. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel