Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2341c61

Browse files
author
Nathan Goldbaum
committed
Merge branch 'simplify-figsize-adjust' of github.com:ngoldbaum/matplotlib into simplify-figsize-adjust
2 parents dd2b2b6 + 23565a5 commit 2341c61

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ addons:
1313
packages:
1414
- inkscape
1515
- libav-tools
16+
- libavcodec-extra-53
1617
- gdb
1718
- mencoder
1819
- dvipng

lib/matplotlib/tests/test_animation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ def isAvailable(self):
130130
# matplotlib.testing.image_comparison
131131
@pytest.mark.parametrize('writer, extension', WRITER_OUTPUT)
132132
def test_save_animation_smoketest(tmpdir, writer, extension):
133-
mpl.rcParams['animation.codec'] = 'h264'
134133
try:
135134
# for ImageMagick the rcparams must be patched to account for
136135
# 'convert' being a built in MS tool, not the imagemagick
@@ -147,10 +146,12 @@ def test_save_animation_smoketest(tmpdir, writer, extension):
147146
ax.set_ylim(-1, 1)
148147

149148
dpi = None
149+
codec = None
150150
if writer == 'ffmpeg':
151151
# Issue #8253
152152
fig.set_size_inches((10.85, 9.2000000000000011))
153153
dpi = 100.
154+
codec = 'h264'
154155

155156
def init():
156157
line.set_data([], [])
@@ -168,7 +169,7 @@ def animate(i):
168169
anim = animation.FuncAnimation(fig, animate, init_func=init, frames=5)
169170
try:
170171
anim.save('movie.' + extension, fps=30, writer=writer, bitrate=500,
171-
dpi=dpi)
172+
dpi=dpi, codec=codec)
172173
except UnicodeDecodeError:
173174
pytest.xfail("There can be errors in the numpy import stack, "
174175
"see issues #1891 and #2679")

0 commit comments

Comments
 (0)