From 9a092c7b640120a766bd1697a17ccfe072583f62 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Thu, 7 Nov 2019 19:19:22 +0100 Subject: [PATCH] Make it easier to test various animation writers in examples. The change here allows one to change animation writer by editing a single place rather than two (both the import and the actual use). --- examples/animation/dynamic_image.py | 4 ++-- examples/animation/simple_anim.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/animation/dynamic_image.py b/examples/animation/dynamic_image.py index d82e62f62af6..57d193ceae26 100644 --- a/examples/animation/dynamic_image.py +++ b/examples/animation/dynamic_image.py @@ -36,8 +36,8 @@ def f(x, y): # # or # -# from matplotlib.animation import FFMpegWriter -# writer = FFMpegWriter(fps=15, metadata=dict(artist='Me'), bitrate=1800) +# writer = animation.FFMpegWriter( +# fps=15, metadata=dict(artist='Me'), bitrate=1800) # ani.save("movie.mp4", writer=writer) plt.show() diff --git a/examples/animation/simple_anim.py b/examples/animation/simple_anim.py index 59552cd1cfa7..507d878bd183 100644 --- a/examples/animation/simple_anim.py +++ b/examples/animation/simple_anim.py @@ -34,8 +34,8 @@ def animate(i): # # or # -# from matplotlib.animation import FFMpegWriter -# writer = FFMpegWriter(fps=15, metadata=dict(artist='Me'), bitrate=1800) +# writer = animation.FFMpegWriter( +# fps=15, metadata=dict(artist='Me'), bitrate=1800) # ani.save("movie.mp4", writer=writer) plt.show()