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

Skip to content

Commit 40548cf

Browse files
author
pkienzle
committed
Correctly distinguish between lines and points in contains() test
svn path=/trunk/matplotlib/; revision=3528
1 parent 2db768e commit 40548cf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/lines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def contains(self, mouseevent):
309309
else:
310310
pixels = self.figure.dpi.get()/72. * self.pickradius
311311

312-
if self._linestyle == '_draw_nothing':
312+
if self._linestyle == 'None':
313313
# If no line, return the nearby point(s)
314314
d = sqrt((xt-mouseevent.x)**2 + (yt-mouseevent.y)**2)
315315
ind = nonzero(less_equal(d, pixels))

0 commit comments

Comments
 (0)