8000 Mention in a few more places that artists default to not-pickable. · matplotlib/matplotlib@40bd601 · GitHub
[go: up one dir, main page]

Skip to content

Commit 40bd601

Browse files
committed
Mention in a few more places that artists default to not-pickable.
1 parent ff15ca9 commit 40bd601

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,7 +1471,8 @@ def __str__(self):
14711471
class PickEvent(Event):
14721472
"""
14731473
A pick event, fired when the user picks a location on the canvas
1474-
sufficiently close to an artist.
1474+
sufficiently close to an artist that has been made pickable with
1475+
`.Artist.set_picker`.
14751476
14761477
Attrs: all the `Event` attributes plus
14771478
@@ -1480,7 +1481,8 @@ class PickEvent(Event):
14801481
mouseevent : `MouseEvent`
14811482
The mouse event that generated the pick.
14821483
artist : `matplotlib.artist.Artist`
1483-
The picked artist.
1484+
The picked artist. Note that artists are not pickable by default
1485+
(see `.Artist.set_picker`).
14841486
other
14851487
Additional attributes may be present depending on the type of the
14861488
picked object; e.g., a `~.Line2D` pick may define different extra
@@ -1831,6 +1833,9 @@ def pick_event(self, mouseevent, artist, **kwargs):
18311833
18321834
This method will be called by artists who are picked and will
18331835
fire off `PickEvent` callbacks registered listeners.
1836+
1837+
Note that artists are not pickable by default (see
1838+
`.Artist.set_picker`).
18341839
"""
18351840
s = 'pick_event'
18361841
event = PickEvent(s, self, mouseevent, artist,

0 commit comments

Comments
 (0)
0