Skip to content

Instantly share code, notes, and snippets.

@jklymak
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jklymak/2f3298b723bee49e8ac9 to your computer and use it in GitHub Desktop.
Save jklymak/2f3298b723bee49e8ac9 to your computer and use it in GitHub Desktop.
Clicking x and y
fig=figure(figsize=(10,12))
def onclick(event):
print 'button=%d, x=%d, y=%d, xdata=%f, ydata=%f'%(
event.button, event.x, event.y, event.xdata, event.ydata)
cid = fig.canvas.mpl_connect('button_press_event', onclick)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment