ax.cla()
ax.plot(plots[curr_pos][0], plots[curr_pos][1])
fig.canvas.draw()
fig = plt.figure()
fig.canvas.mpl_connect('key_press_event', key_event)
ax = fig.add_subplot(111)
ax.plot(t, y1)
plt.show()
Scroll backwards and forwards through matplotlib plots