Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a148383

Browse filesBrowse files
authored
Merge pull request #23872 from meeseeksmachine/auto-backport-of-pr-23871-on-v3.6.x
Backport PR #23871 on branch v3.6.x (DOC: Fix formatting of pick event demo example)
2 parents fda5b81 + 3645f7d commit a148383
Copy full SHA for a148383

File tree

Expand file treeCollapse file tree

1 file changed

+13
-10
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+13
-10
lines changed

‎examples/event_handling/pick_event_demo.py

Copy file name to clipboardExpand all lines: examples/event_handling/pick_event_demo.py
+13-10Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
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
@@ -31,7 +31,7 @@
3131
3232
After you have enabled an artist for picking by setting the "picker"
3333
property, 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):
4242
The pick event (matplotlib.backend_bases.PickEvent) which is passed to
4343
your 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
5558
Additionally, certain artists like Line2D and PatchCollection may
5659
attach additional meta data like the indices into the data that meet

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.