def picker(event):
    print(event.artist.get_gid())
print(event.ind)
k = event.artist.get_gid() + tuple(event.ind)
try:
    next_data = data_bucket[k]
except KeyError:
    print('no generations of data left')
return
fig, ax = plt.subplots()
ax.plot(next_data, gid=k, picker=5, ls='-')
fig.canvas.mpl_connect('pick_event', picker)
How to generate multiple plots by clicking a single plot for more infomation using clickable python events