@@ -59,9 +59,9 @@ supported.
5959The inner workings of `FuncAnimation ` is more-or-less::
6060
6161 for d in frames:
62- artists = func(d, *fargs)
63- fig.canvas.draw_idle()
64- fig.canvas.start_event_loop(interval)
62+ artists = func(d, *fargs)
63+ fig.canvas.draw_idle()
64+ fig.canvas.start_event_loop(interval)
6565
6666with details to handle 'blitting' (to dramatically improve the live
6767performance), to be non-blocking, not repeatedly start/stop the GUI
@@ -211,16 +211,18 @@ debug.
211211 FFMpegFileWriter
212212 ImageMagickFileWriter
213213
214- Fundamentally, a `MovieWriter ` provides a way to grab sequential frames
215- from the same underlying `~matplotlib.figure.Figure ` object. The base
216- class `MovieWriter ` implements 3 methods and a context manager. The
217- only difference between the pipe-based and file-based writers is in the
218- arguments to their respective ``setup `` methods.
214+ The writer classes provide a way to grab sequential frames from the same
215+ underlying `~matplotlib.figure.Figure `. They all provide three methods that
216+ must be called in sequence:
219217
220- The ``setup() `` method is used to prepare the writer (possibly opening
221- a pipe), successive calls to ``grab_frame() `` capture a single frame
222- at a time and ``finish() `` finalizes the movie and writes the output
223- file to disk. For example ::
218+ - `~.AbstractMovieWriter.setup ` prepares the writer (e.g. opening a pipe).
219+ Pipe-based and file-based writers take different arguments to ``setup() ``.
220+ - `~.AbstractMovieWriter.grab_frame ` can then be called as often as
221+ needed to capture a single frame at a time
222+ - `~.AbstractMovieWriter.finish ` finalizes the movie and writes the output
223+ file to disk.
224+
225+ Example::
224226
225227 moviewriter = MovieWriter(...)
226228 moviewriter.setup(fig, 'my_movie.ext', dpi=100)
@@ -230,14 +232,14 @@ file to disk. For example ::
230232 moviewriter.finish()
231233
232234If using the writer classes directly (not through `Animation.save `), it is
233- strongly encouraged to use the `~MovieWriter. saving ` context manager ::
235+ strongly encouraged to use the `~.AbstractMovieWriter. saving ` context manager::
234236
235237 with moviewriter.saving(fig, 'myfile.mp4', dpi=100):
236238 for j in range(n):
237239 update_figure(j)
238240 moviewriter.grab_frame()
239241
240- to ensures that setup and cleanup are performed as necessary.
242+ to ensure that setup and cleanup are performed as necessary.
241243
242244Examples
243245--------
0 commit comments