2121 of the data within epsilon of the pick event
2222
2323* function - if picker is callable, it is a user supplied function which
24- determines whether the artist is hit by the mouse event.
24+ determines whether the artist is hit by the mouse event. ::
2525
2626 hit, props = picker(artist, mouseevent)
2727
3131
3232After you have enabled an artist for picking by setting the "picker"
3333property, you need to connect to the figure canvas pick_event to get
34- pick callbacks on mouse press events. For example,
34+ pick callbacks on mouse press events. For example, ::
3535
3636 def pick_handler(event):
3737 mouseevent = event.mouseevent
@@ -42,15 +42,18 @@ def pick_handler(event):
4242The pick event (matplotlib.backend_bases.PickEvent) which is passed to
4343your callback is always fired with two attributes:
4444
45- mouseevent - the mouse event that generate the pick event. The
46- mouse event in turn has attributes like x and y (the coordinates in
47- display space, such as pixels from left, bottom) and xdata, ydata (the
48- coords in data space). Additionally, you can get information about
49- which buttons were pressed, which keys were pressed, which Axes
50- the mouse is over, etc. See matplotlib.backend_bases.MouseEvent
51- for details.
45+ mouseevent
46+ the mouse event that generate the pick event.
5247
53- artist - the matplotlib.artist that generated the pick event.
48+ The mouse event in turn has attributes like x and y (the coordinates in
49+ display space, such as pixels from left, bottom) and xdata, ydata (the
50+ coords in data space). Additionally, you can get information about
51+ which buttons were pressed, which keys were pressed, which Axes
52+ the mouse is over, etc. See matplotlib.backend_bases.MouseEvent
53+ for details.
54+
55+ artist
56+ the matplotlib.artist that generated the pick event.
5457
5558Additionally, certain artists like Line2D and PatchCollection may
5659attach additional meta data like the indices into the data that meet
0 commit comments