我的代码如下:
sched = Scheduler()
sched.start()
y = range(1, 11)
x = range(1, 11)
fig = plt.figure(1)
ax = fig.add_subplot(111)
Ln, = ax.plot(x,y)
plt.ion()
@sched.interval_schedule(seconds = 10)
def update_line():
c = 0
while c <= 9:
y[c] = y[c] + 1
c = c+1
Ln.set_ydata(y)
plt.pause(1)
它给了我错误:“跳过:达到运行实例的最大数量(1)” - 我希望它每次都用新的Y值更新图表,那么我做错了什么?
由于