【发布时间】:2019-08-13 10:56:25
【问题描述】:
我似乎找不到任何解决问题的方法,所以我会发布一个问题,即使某处似乎应该有一个简单的解决方案。
我想在 tkinter 中使用实时绘图,发现 matplotlib 动画是最好的解决方案。但是,我希望情节在代码中的特定行上更新。有没有办法做到这一点? (不基于区间)
f = Figure(figsize=(5,4), dpi=100)
def animate(i):
a.plot(lidarX, lidarY, '.g', markersize = 0.5)
ani = animation.FuncAnimation(f, animate, interval=1000)
# Code to add the figure to a FigureCanvasTkAgg and pack it to the gui
提前致谢。
【问题讨论】:
-
a定义在哪里?
标签: python python-3.x matplotlib animation