Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 312fdb7

Browse files
authored
Merge pull request #24542 from StefRe/fix/animation_tutorial
DOC: Clarify supported animation formats in animation tutorial
2 parents 7469aaa + 89cd9e7 commit 312fdb7

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

tutorials/introductory/animation_tutorial.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ def update(frame):
178178
# ========================================== ===========================
179179
# Writer Supported Formats
180180
# ========================================== ===========================
181-
# `~matplotlib.animation.PillowWriter` .gif, .apng
181+
# `~matplotlib.animation.PillowWriter` .gif, .apng, .webp
182182
# `~matplotlib.animation.HTMLWriter` .htm, .html, .png
183-
# `~matplotlib.animation.FFMpegWriter` All formats supported by
184-
# *ffmpeg*
185-
# `~matplotlib.animation.ImageMagickWriter` .gif
183+
# `~matplotlib.animation.FFMpegWriter` All formats supported by *ffmpeg*
184+
# `~matplotlib.animation.ImageMagickWriter` All formats supported by
185+
# *imagemagick*
186186
# ========================================== ===========================
187187
#
188188
# To save animations using any of the writers, we can use the
@@ -218,6 +218,11 @@ def update(frame):
218218
# Imagemagick writers::
219219
#
220220
# ani.save(filename="/tmp/imagemagick_example.gif", writer="imagemagick")
221+
# ani.save(filename="/tmp/imagemagick_example.webp", writer="imagemagick")
222+
# ani.save(filename="apng:/tmp/imagemagick_example.apng",
223+
# writer="imagemagick", extra_args=["-quality", "100"])
224+
#
225+
# (the ``extra_args`` for apng are needed to reduce filesize by ~10x)
221226
#
222227
# Since the frames are piped out to *ffmpeg* or *imagemagick*,
223228
# ``writer="ffmpeg"`` and ``writer="imagemagick"`` support all formats

0 commit comments

Comments
 (0)