@@ -51,9 +51,9 @@ supported.
5151The inner workings of `FuncAnimation ` is more-or-less::
5252
5353 for d in frames:
54- artists = func(d, *fargs)
55- fig.canvas.draw_idle()
56- fig.canvas.start_event_loop(interval)
54+ artists = func(d, *fargs)
55+ fig.canvas.draw_idle()
56+ fig.canvas.start_event_loop(interval)
5757
5858with details to handle 'blitting' (to dramatically improve the live
5959performance), to be non-blocking, not repeatedly start/stop the GUI
@@ -207,16 +207,18 @@ debug.
207207 FFMpegFileWriter
208208 ImageMagickFileWriter
209209
210- Fundamentally, a `MovieWriter ` provides a way to grab sequential frames
211- from the same underlying `~matplotlib.figure.Figure ` object. The base
212- class `MovieWriter ` implements 3 methods and a context manager. The
213- only difference between the pipe-based and file-based writers is in the
214- arguments to their respective ``setup `` methods.
210+ The writer classes provide a way to grab sequential frames from the same
211+ underlying `~matplotlib.figure.Figure `. They all provide three methods that
212+ must be called in sequence:
215213
216- The ``setup() `` method is used to prepare the writer (possibly opening
217- a pipe), successive calls to ``grab_frame() `` capture a single frame
218- at a time and ``finish() `` finalizes the movie and writes the output
219- file to disk. For example ::
214+ - `~.AbstractMovieWriter.setup ` prepares the writer (e.g. opening a pipe).
215+ Pipe-based and file-based writers take different arguments to ``setup() ``.
216+ - `~.AbstractMovieWriter.grab_frame ` can then be called as often as
217+ needed to capture a single frame at a time
218+ - `~.AbstractMovieWriter.finish ` finalizes the movie and writes the output
219+ file to disk.
220+
221+ Example::
220222
221223 moviewriter = MovieWriter(...)
222224 moviewriter.setup(fig, 'my_movie.ext', dpi=100)
@@ -226,14 +228,14 @@ file to disk. For example ::
226228 moviewriter.finish()
227229
228230If using the writer classes directly (not through `Animation.save `), it is
229- strongly encouraged to use the `~MovieWriter. saving ` context manager ::
231+ strongly encouraged to use the `~.AbstractMovieWriter. saving ` context manager::
230232
231233 with moviewriter.saving(fig, 'myfile.mp4', dpi=100):
232234 for j in range(n):
233235 update_figure(j)
234236 moviewriter.grab_frame()
235237
236- to ensures that setup and cleanup are performed as necessary.
238+ to ensure that setup and cleanup are performed as necessary.
237239
238240Examples
239241--------
0 commit comments