Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I want to see the effect of a continuous drawing, with the following code(in python3):
- fg = plt.figure()
- ax = fg.add_subplot(1,1,1)
- plt.ion()
- for d in range(3):
- x_data = np.array([])
- y_data = np.array([])
- #plt.clf()
- for t in range(v):
- x = t
- x_data = np.append(x_data,x)
- y = t*d
- y_data = np.append(y_data,y)
- #ax.lines = ax.plot(x_data,y_data)
- plt.plot(x_data,y_data)
- #plt.show()
- #plt.pause(0.3)
- time.sleep(0.3)
- plt.show()
- plt.close('all')
Add Comment
Please, Sign In to add comment