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 1305378 commit 3e41f32Copy full SHA for 3e41f32
lib/matplotlib/widgets.py
@@ -19,7 +19,6 @@
19
import numpy as np
20
from matplotlib import rcParams
21
22
-from .mlab import dist
23
from .patches import Circle, Rectangle, Ellipse
24
from .lines import Line2D
25
from .transforms import blended_transform_factory
@@ -1000,7 +999,8 @@ def _clicked(self, event):
1000
999
1001
def inside(p):
1002
pcirc = np.array([p.center[0], p.center[1]])
1003
- return dist(pclicked, pcirc) < p.radius
+ d = pclicked - pcirc
+ return np.sqrt(np.dot(d, d)) < p.radius
1004
1005
for i, (p, t) in enumerate(zip(self.circles, self.labels)):
1006
if t.get_window_extent().contains(event.x, event.y) or inside(p):
0 commit comments