Code: Alles auswählen
def run(data):
# update the data
t,y = data
xdata.append(t)
ydata.append(y)
xmin, xmax = ax.get_xlim()
if t >= xmax:
ax.set_xlim(xmin, 2*xmax)
ax.figure.canvas.draw()
line.set_data(xdata, ydata)
return line,
Dort steht
Code: Alles auswählen
return line,
Hier noch so ein Zuweisungsbeispiel mit Komma:
Code: Alles auswählen
line, = ax.plot([], [], lw=2)