diff --git a/lib/matplotlib/lines.py b/lib/matplotlib/lines.py index 8df89373adf1..35c1a1c75628 100644 --- a/lib/matplotlib/lines.py +++ b/lib/matplotlib/lines.py @@ -611,9 +611,7 @@ def set_picker(self, p): p : float or callable[[Artist, Event], tuple[bool, dict]] If a float, it is used as the pick radius in points. """ - if callable(p): - self._contains = p - else: + if not callable(p): self.set_pickradius(p) self._picker = p