Skip to content

Commit 3d3460e

Browse files
anntzerImportanceOfBeingErnest
authored andcommitted
Make it easier to test various animation writers in examples. (#15627)
The change here allows one to change animation writer by editing a single place rather than two (both the import and the actual use).
1 parent 330a054 commit 3d3460e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/animation/dynamic_image.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ def f(x, y):
3636
#
3737
# or
3838
#
39-
# from matplotlib.animation import FFMpegWriter
40-
# writer = FFMpegWriter(fps=15, metadata=dict(artist='Me'), bitrate=1800)
39+
# writer = animation.FFMpegWriter(
40+
# fps=15, metadata=dict(artist='Me'), bitrate=1800)
4141
# ani.save("movie.mp4", writer=writer)
4242

4343
plt.show()

examples/animation/simple_anim.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ def animate(i):
3434
#
3535
# or
3636
#
37-
# from matplotlib.animation import FFMpegWriter
38-
# writer = FFMpegWriter(fps=15, metadata=dict(artist='Me'), bitrate=1800)
37+
# writer = animation.FFMpegWriter(
38+
# fps=15, metadata=dict(artist='Me'), bitrate=1800)
3939
# ani.save("movie.mp4", writer=writer)
4040

4141
plt.show()

0 commit comments

Comments
 (0)