Thanks to visit codestin.com Credit goes to github.com
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.
1 parent c9582f0 commit 46b96aeCopy full SHA for 46b96ae
1 file changed
lib/matplotlib/widgets.py
@@ -3076,9 +3076,9 @@ def _onmove(self, event):
3076
if self._use_data_coordinates:
3077
refx, refy = dx, dy
3078
else:
3079
- # Add 1e-6 to avoid divided by zero error
3080
- refx = event.xdata / (eventpress.xdata or 1E-6)
3081
- refy = event.ydata / (eventpress.ydata or 1E-6)
+ # Get dx/dy in display coordinates
+ refx = event.x - eventpress.x
+ refy = event.y - eventpress.y
3082
3083
x0, x1, y0, y1 = self._extents_on_press
3084
# rotate an existing shape
0 commit comments