Skip to content

Commit

Permalink
Fix partial example
Browse files Browse the repository at this point in the history
  • Loading branch information
oscargus committed Oct 22, 2022
1 parent cb0a6a0 commit a6ef03e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/api/animation_api.rst
Expand Up @@ -147,17 +147,17 @@ function. ::
def init():
ax.set_xlim(0, 2*np.pi)
ax.set_ylim(-1, 1)
return ln,
return line1,

def update(frame, ln, x, y):
x.append(frame)
y.append(np.sin(frame))
ln.set_data(xdata, ydata)
ln.set_data(x, y)
return ln,

xdata, ydata = [], []
ani = FuncAnimation(
fig, partial(update, ln=line1, x=xdata, y=ydata),
fig, partial(update, ln=line1, x=[], y=[]),
frames=np.linspace(0, 2 * np.pi, 128),
init_func=init, blit=True)

Expand Down

0 comments on commit a6ef03e

Please sign in to comment.