Realtime plotting in Python
问题 I have a data stream giving me 125 floats per second and I want to plot them live. At the moment my code looks like this: Code to read data from stream counter = 0 while True: counter = counter+1 data from stream (x values) In reality the code looks a bit more complicated, of course, but this will make giving advice easier, I think. I was thinking about just saving the graph as a file: counter=0 a_data=np.zeros(100,float) #this is limited to 100 floats while True: counter = counter+1