Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 89cd9e7

Browse filesBrowse files
committed
DOC: Clarify supported animation formats in animation tutorial
- fix table to state the same as the text (ImageMagickWriter supports all formats supported by imagemagick) and add some examples (the extra args for apng are needed to reduce filesize by ~10x) - add .webp as supported format to Pillow (since 2018 vers 5.0.0 ) - fix table formatting
1 parent bdf178e commit 89cd9e7
Copy full SHA for 89cd9e7

File tree

Expand file treeCollapse file tree

1 file changed

+9
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-4
lines changed
Open diff view settings
Collapse file

‎tutorials/introductory/animation_tutorial.py‎

Copy file name to clipboardExpand all lines: tutorials/introductory/animation_tutorial.py
+9-4Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.