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 f7baa83

Browse filesBrowse files
committed
Fix docstring for PickEvent.
`zip(...)` does not print out nicely under Python 3.
1 parent 1214b21 commit f7baa83
Copy full SHA for f7baa83

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎lib/matplotlib/backend_bases.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1576,13 +1576,13 @@ class PickEvent(Event):
15761576
15771577
Example usage::
15781578
1579-
line, = ax.plot(rand(100), 'o', picker=5) # 5 points tolerance
1579+
ax.plot(np.rand(100), 'o', picker=5) # 5 points tolerance
15801580
15811581
def on_pick(event):
1582-
thisline = event.artist
1583-
xdata, ydata = thisline.get_data()
1582+
line = event.artist
1583+
xdata, ydata = line.get_data()
15841584
ind = event.ind
1585-
print('on pick line:', zip(xdata[ind], ydata[ind]))
1585+
print('on pick line:', np.array([xdata[ind], ydata[ind]]).T)
15861586
15871587
cid = fig.canvas.mpl_connect('pick_event', on_pick)
15881588

0 commit comments

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