Figure GUI freezing

后端 未结 2 1615
攒了一身酷
攒了一身酷 2020-12-12 03:35

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

2条回答
  •  一生所求
    2020-12-12 04:26

    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,

提交回复
热议问题