Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- import matplotlib.animation as animation
- import sys
- import numpy as np
- def animate(i, ax):
- with open(sys.argv[1]) as f:
- arr = np.fromfile(f, np.uint32)
- ax.clear()
- ax.set_title('Foo')
- ax.plot(arr)
- fig = plt.figure()
- ax = fig.add_subplot(111)
- ani = animation.FuncAnimation(fig, animate, fargs=(ax,))
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement