I am fairly new in python, and I am trying to have a plot, based on data stored in a file. This file may be updated at any time, so I am trying to make the drawing updated e
You want to use the plt.pause(3)
function instead of time.sleep()
. pause
includes the necessary calls to the gui main loop to cause the figure to re-draw.
also see: Python- 1 second plots continous presentation, matplotlib real-time linear line, pylab.ion() in python 2, matplotlib 1.1.1 and updating of the plot while the program runs,