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 ba5bab7 commit 860cc4aCopy full SHA for 860cc4a
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
@@ -1031,7 +1030,8 @@ def _clicked(self, event):
1031
1030
1032
def inside(p):
1033
pcirc = np.array([p.center[0], p.center[1]])
1034
- return dist(pclicked, pcirc) < p.radius
+ d = pclicked - pcirc
+ return np.sqrt(np.dot(d, d)) < p.radius
1035
1036
for i, (p, t) in enumerate(zip(self.circles, self.labels)):
1037
if t.get_window_extent().contains(event.x, event.y) or inside(p):
0 commit comments