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

Skip to content

Commit d892095

Browse files
authored
Don't set the never-used Line2D._contains in set_picker. (#24761)
The _contains attribute is never accessed anywhere in the library (since the removal of get/set_contains). Note that this patch intentionally doesn't try to disentangle the much more complex interplay between set_picker and set_pickradius...
1 parent 48747b2 commit d892095

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/matplotlib/lines.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -611,9 +611,7 @@ def set_picker(self, p):
611611
p : float or callable[[Artist, Event], tuple[bool, dict]]
612612
If a float, it is used as the pick radius in points.
613613
"""
614-
if callable(p):
615-
self._contains = p
616-
else:
614+
if not callable(p):
617615
self.set_pickradius(p)
618616
self._picker = p
619617

0 commit comments

Comments
 (0)