Advertisement
Guest User

Untitled

a guest
Jun 19th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2. import matplotlib.animation as animation
  3. import sys
  4. import numpy as np
  5.  
  6. def animate(i, ax):
  7.     with open(sys.argv[1]) as f:
  8.         arr = np.fromfile(f, np.uint32)
  9.         ax.clear()
  10.         ax.set_title('Foo')
  11.         ax.plot(arr)
  12.        
  13.  
  14.  
  15. fig = plt.figure()
  16. ax = fig.add_subplot(111)
  17. ani = animation.FuncAnimation(fig, animate, fargs=(ax,))
  18. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement