I'm trying to use the following code to update my plot every 10 seconds:
@sched.interval_schedule(seconds = 10)
def update_line():
c = 0
while c <= 9:
y[c] = y[c] + 1
c = c+1
x = range(1, 11)
plt.ion()
fig = plt.figure(1)
ax = fig.add_subplot(111)
plt.plot(x, y)
It is only plotting the graph for the first set of y data, after which is displays the error: "WARNING:apscheduler.scheduler:Execution of job "update_line (trigger: interval[0:00:10], next run at: 2013-02-06 16:00:42.942079)" skipped: maximum number of running instances reached (1)"
Should i be using draw() in some way instead?
Thanks