Skip to content

Commit 2ed5944

Browse files
committed
Default animation.convert_args to ["-layers", "OptimizePlus"].
On the simple_anim.py example, adding e.g. ``` plt.rcParams["animation.writer"] = "imagemagick" plt.rcParams["animation.convert_args"] = [] ani.save("old.gif") plt.rcParams["animation.convert_args"] = ["-layers", "OptimizePlus"] ani.save("new.gif") ``` shows that OptimizePlus yields a >2.5x decrease in gif size.
1 parent 4f9ac38 commit 2ed5944

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The default ``rcParams["animation.convert_args"]`` changed
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
It now defaults to ``["-layers", "OptimizePlus"]`` to try to generate smaller
4+
GIFs. Set it back to an empty list to recover the previous behavior.

lib/matplotlib/mpl-data/matplotlibrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@
779779
## ImageMagick in the registry (as convert is also the name of a system tool).
780780
#animation.convert_path: convert
781781
## Additional arguments to pass to convert.
782-
#animation.convert_args:
782+
#animation.convert_args: -layers, OptimizePlus
783783
#
784784
#animation.embed_limit: 20.0 # Limit, in MB, of size of base64 encoded
785785
# animation in HTML (i.e. IPython notebook)

0 commit comments

Comments
 (0)