Skip to content

Commit 1259895

Browse files
authored
Update animation_api.rst (#17081)
* Update animation_api.rst * Update animation_api.rst
1 parent b731c29 commit 1259895

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
@@ -212,9 +212,9 @@ at a time and ``finish()`` finalizes the movie and writes the output
212212
file to disk. For example ::
213213

214214
moviewriter = MovieWriter(...)
215-
moviewriter.setup(fig=fig, 'my_movie.ext', dpi=100)
215+
moviewriter.setup(fig, 'my_movie.ext', dpi=100)
216216
for j in range(n):
217-
update_figure(n)
217+
update_figure(j)
218218
moviewriter.grab_frame()
219219
moviewriter.finish()
220220

@@ -223,7 +223,7 @@ strongly encouraged to use the `~MovieWriter.saving` context manager ::
223223

224224
with moviewriter.saving(fig, 'myfile.mp4', dpi=100):
225225
for j in range(n):
226-
update_figure(n)
226+
update_figure(j)
227227
moviewriter.grab_frame()
228228

229229
to ensures that setup and cleanup are performed as necessary.

0 commit comments

Comments
 (0)