Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fig, (ax1,ax2) = plt.subplots(2,sharex=True)
- def animate(t):
- x = np.linspace(0,1)
- ax1.clear()
- ax1.plot(x,np.cos(x-t))
- ax2.clear()
- ax2.plot(x,np.cos(x-2*t))
- ani = animation.FuncAnimation(fig,animate,np.linspace(0,1),interval=50)
- #ani.save("test.mp4")
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement