Skip to content

Commit d39dc38

Browse files
committed
Update examples.
1 parent e5774b3 commit d39dc38

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

examples/animation/basic_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ def update_line(num, data, line):
2929

3030
im_ani = animation.ArtistAnimation(fig2, ims, interval=50, repeat_delay=3000,
3131
blit=True)
32-
#im_ani.save('im.mp4')
32+
#im_ani.save('im.mp4', metadata={'artist':'Guido'})
3333

3434
plt.show()

examples/animation/moviewriter.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@
44
# for use in an interactive setting.
55

66
import numpy as np
7+
import matplotlib
8+
matplotlib.use("Agg")
79
import matplotlib.pyplot as plt
810
import matplotlib.animation as manimation
911

1012
FFMpegWriter = manimation.writers['ffmpeg']
11-
writer = FFMpegWriter(fps=15)
13+
metadata = dict(title='Movie Test', artist='Matplotlib',
14+
comment='Movie support!')
15+
writer = FFMpegWriter(fps=15, metadata=metadata)
1216

1317
fig = plt.figure()
1418
l, = plt.plot([], [], 'k-o')

0 commit comments

Comments
 (0)