MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / run

Function run

galleries/examples/animation/animate_decay.py:42–54  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

40
41
42def run(data):
43 # update the data
44 t, y = data
45 xdata.append(t)
46 ydata.append(y)
47 xmin, xmax = ax.get_xlim()
48
49 if t >= xmax:
50 ax.set_xlim(xmin, 2*xmax)
51 ax.figure.canvas.draw()
52 line.set_data(xdata, ydata)
53
54 return line,
55
56# Only save last 100 frames, but run forever
57ani = animation.FuncAnimation(fig, run, data_gen, interval=100, init_func=init,

Callers

nothing calls this directly

Calls 4

get_xlimMethod · 0.45
set_xlimMethod · 0.45
drawMethod · 0.45
set_dataMethod · 0.45

Tested by

no test coverage detected