【发布时间】:2022-01-24 04:05:07
【问题描述】:
我正在尝试理解以下代码
s_time = Slider(ax_time, 'Time', 0, 30, valinit=0)
# if deleting the following part, plot will not move
def update(val):
pos = s_time.val
ax.axis([pos, pos+10, 20, 40])
fig.canvas.draw_idle()
s_time.on_changed(update)
我很困惑
这里的“s_time.val”有什么作用? a(滑块变量)。(输入参数)
谢谢!
【问题讨论】: