我有一个名为plot()的函数,它显示一个包含数据的图形。plot()从每隔几秒钟更新一次的文本文件中获取数据。你知道吗
我希望plot()关闭matplotlib窗口,然后每隔t秒运行一次。你知道吗
到目前为止我所拥有的:
plot(t):
draw plt
plt.show()
time.sleep(t)
plt.close('all')
def rinse_repeat(t, total_time):
while time.time < total_time
plot()
rinse_repeat
我怎样才能让它工作?谢谢。你知道吗
这应该对你有用。只需做一个等待并计算秒数的循环:
相关问题 更多 >
编程相关推荐