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 time
- fig = plt.figure()
- ax1 = fig.add_subplot(1,1,1)
- def animate(i):
- pullData = open('sampleData.txt','r').read()
- dataArray = pullData.split('\n')
- xar=[]
- yar=[]
- for eachLine in Data:
- if len(eachLine)>1:
- x,y = eachLine.split(',')
- xar.append(int(x))
- yar.append(int(x))
- ax1.plot(xar,yar)
- ani = animation.FuncAnimation(fig,animate, interval=1000)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement