I am new to python, and I am trying to implement a scrolling function to flip through a set of images quickly using keyboard keys.
I tried first to run the example code for the Matplotlib Documentation:
`
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(np.random.rand(10))
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)
`
But when I run it, the "onclick" features do not work.
I am trying to run this in a jupyter notebook using python 3, on a Linux distribution.
There is probably a simple reason behind the fact that it's not working, but I can't figure it out...
Many thanks in advance, Best wishes, Camille.