Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/python
- import numpy as np
- import matplotlib.pyplot as plt
- import matplotlib.animation as anim
- x = np.arange(0, 4*np.pi, 0.1)
- fig = plt.figure()
- line, = plt.plot(x, np.sin(x))
- def update_figure(n):
- line.set_ydata(np.sin(n)*np.sin(x))
- line_anim = anim.FuncAnimation(fig, update_figure, np.arange(0, 2*np.pi, 0.1), interval=50)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement