python - Real-time plot does not show up -



python - Real-time plot does not show up -

i plotting sensor info ftdi port using plt.plot() pyplot. unfortunately don't see line reason. when alter mark type: plt.plot(duration, temp, 'o') (or other point-like marktype) goes should. trying increment sleep time (reading problems plot , live-plotting other similar questions) not case.(i using ubuntu 14.04 if case reason)

#!/usr/bin/python import time import numpy np import matplotlib.pyplot plt print "we plotting sonar values" f = open('/dev/ttyusb0', 'r') plt.axis() plt.ion() plt.show() duration = 0; while true: print f.readline() temp = f.readline() temp = int(temp[1:]) plt.plot(duration, temp, 'o') duration+=1 plt.draw() time.sleep(0.1)

python matplotlib plot real-time

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -