From 5f66224a59a1b34f075fbafd8e56fae8931af815 Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Fri, 2 Jan 2026 21:57:18 +0100 Subject: [PATCH] Backport PR #30910: DOC: Improve writer parameter docs of Animation.save() --- lib/matplotlib/animation.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/animation.py b/lib/matplotlib/animation.py index a87f00201124..a4eb80ad1b34 100644 --- a/lib/matplotlib/animation.py +++ b/lib/matplotlib/animation.py @@ -951,9 +951,21 @@ def save(self, filename, writer=None, fps=None, dpi=None, codec=None, filename : str The output filename, e.g., :file:`mymovie.mp4`. - writer : `MovieWriter` or str, default: :rc:`animation.writer` - A `MovieWriter` instance to use or a key that identifies a - class to use, such as 'ffmpeg'. + writer : `AbstractMovieWriter` subclass or str, default: :rc:`animation.writer` + The writer used to grab the frames and create the movie file. + This can be an instance of an `AbstractMovieWriter` subclass or a + string. The builtin writers are + + ================== ============================== + str class + ================== ============================== + 'ffmpeg' `.FFMpegWriter` + 'ffmpeg_file' `.FFMpegFileWriter` + 'imagemagick' `.ImageMagickWriter` + 'imagemagick_file' `.ImageMagickFileWriter` + 'pillow' `.PillowWriter` + 'html' `.HTMLWriter` + ================== ============================== fps : int, optional Movie frame rate (per second). If not set, the frame rate from the