Skip to content

Commit

Permalink
Merge pull request matplotlib#6614 from anntzer/fix-pickevent-docstring
Browse files Browse the repository at this point in the history
Fix docstring for PickEvent.
  • Loading branch information
tacaswell authored Jun 21, 2016
2 parents 1214b21 + f7baa83 commit f3895f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/matplotlib/backend_bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -1576,13 +1576,13 @@ class PickEvent(Event):
Example usage::
line, = ax.plot(rand(100), 'o', picker=5) # 5 points tolerance
ax.plot(np.rand(100), 'o', picker=5) # 5 points tolerance
def on_pick(event):
thisline = event.artist
xdata, ydata = thisline.get_data()
line = event.artist
xdata, ydata = line.get_data()
ind = event.ind
print('on pick line:', zip(xdata[ind], ydata[ind]))
print('on pick line:', np.array([xdata[ind], ydata[ind]]).T)
cid = fig.canvas.mpl_connect('pick_event', on_pick)
Expand Down

0 comments on commit f3895f9

Please sign in to comment.