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

Function update

galleries/users_explain/animations/animations.py:118–128  ·  view source on GitHub ↗
(frame)

Source from the content-addressed store, hash-verified

116
117
118def update(frame):
119 # for each frame, update the data stored on each artist.
120 x = t[:frame]
121 y = z[:frame]
122 # update the scatter plot:
123 data = np.stack([x, y]).T
124 scat.set_offsets(data)
125 # update the line plot:
126 line2.set_xdata(t[:frame])
127 line2.set_ydata(z2[:frame])
128 return (scat, line2)
129
130
131ani = animation.FuncAnimation(fig=fig, func=update, frames=40, interval=30)

Callers

nothing calls this directly

Calls 3

set_xdataMethod · 0.80
set_ydataMethod · 0.80
set_offsetsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…