Skip to content

Commit a6ef03e

Browse files
committed
Fix partial example
1 parent cb0a6a0 commit a6ef03e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/api/animation_api.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,17 @@ function. ::
147147
def init():
148148
ax.set_xlim(0, 2*np.pi)
149149
ax.set_ylim(-1, 1)
150-
return ln,
150+
return line1,
151151

152152
def update(frame, ln, x, y):
153153
x.append(frame)
154154
y.append(np.sin(frame))
155-
ln.set_data(xdata, ydata)
155+
ln.set_data(x, y)
156156
return ln,
157157

158158
xdata, ydata = [], []
159159
ani = FuncAnimation(
160-
fig, partial(update, ln=line1, x=xdata, y=ydata),
160+
fig, partial(update, ln=line1, x=[], y=[]),
161161
frames=np.linspace(0, 2 * np.pi, 128),
162162
init_func=init, blit=True)
163163

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy