8000 Fix partial example · matplotlib/matplotlib@a6ef03e · GitHub
[go: up one dir, main page]

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)
149 93B3 149
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)
0