We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5cd6d69 + 46b96ae commit 7cc7858Copy full SHA for 7cc7858
lib/matplotlib/widgets.py
@@ -3075,9 +3075,9 @@ def _onmove(self, event):
3075
if self._use_data_coordinates:
3076
refx, refy = dx, dy
3077
else:
3078
- # Add 1e-6 to avoid divided by zero error
3079
- refx = event.xdata / (eventpress.xdata or 1E-6)
3080
- refy = event.ydata / (eventpress.ydata or 1E-6)
+ # Get dx/dy in display coordinates
+ refx = event.x - eventpress.x
+ refy = event.y - eventpress.y
3081
3082
x0, x1, y0, y1 = self._extents_on_press
3083
# rotate an existing shape
0 commit comments