Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7454854

Browse files
committed
Fix DraggableRectangle event handling example to no longer use the (now removed) Rectangle.xy property.
svn path=/trunk/matplotlib/; revision=6344
1 parent 01df054 commit 7454854

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

doc/users/event_handling.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,8 @@ Here is the solution::
182182

183183
contains, attrd = self.rect.contains(event)
184184
if not contains: return
185-
print 'event contains', self.rect.xy
186-
x0, y0 = self.rect.xy
185+
x0, y0 = self.rect.get_x(), self.rect.get_y()
186+
print 'event contains', x0, y0
187187
self.press = x0, y0, event.xdata, event.ydata
188188

189189
def on_motion(self, event):

0 commit comments

Comments
 (0)