I followed the tutorial on live graph plot from CSV/TXT file, but when I am running the python program no graph is created, instead, the terminal goes into busy mode until I exit using 'Ctrl+Z'.
For some reason, the animate function in matplotlib is not working for me. Instead I wrote the following code, which is supposed to do the job:
import matplotlib.pyplot as plt
while True:
pullData = open("data1.csv","r").read()
dataArray = pullData.split('\n')
xar = []
yar = []
for eachLine in dataArray:
if len(eachLine)>1:
x,y = eachLine.split(',')
xar.append(x)
yar.append(y)
plt.plot(xar, yar)
plt.pause(0.05)
plt.show()
But the above code is not reading the data points from the CSV file properly and generating the wrong graph.
I currently have Python 3.6.5 :: Anaconda, Inc. installed on the system. Could someone help in this, please? Thank you in advance.
