Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1935f12

Browse filesBrowse files
committed
fixes issue #2482 and adds note about incompatibility between bbox options and animation backends
1 parent 5485cb9 commit 1935f12
Copy full SHA for 1935f12

File tree

Expand file treeCollapse file tree

2 files changed

+8
-4
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-4
lines changed

‎lib/matplotlib/animation.py

Copy file name to clipboardExpand all lines: lib/matplotlib/animation.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,9 @@ class FFMpegFileWriter(FileMovieWriter, FFMpegBase):
399399
def _args(self):
400400
# Returns the command line parameters for subprocess to use
401401
# ffmpeg to create a movie using a collection of temp images
402-
return [self.bin_path(), '-vframes', str(self._frame_counter),
403-
'-r', str(self.fps), '-i',
404-
self._base_temp_name()] + self.output_args
402+
return [self.bin_path(), '-i', self._base_temp_name()-vframes,
403+
'-vframes', str(self._frame_counter),
404+
'-r', str(self.fps), ] + self.output_args
405405

406406

407407
# Base class of avconv information. AVConv has identical arguments to
@@ -1002,7 +1002,7 @@ def __init__(self, fig, func, frames=None, init_func=None, fargs=None,
10021002
self._iter_gen = lambda: iter(frames)
10031003
self.save_count = len(frames)
10041004
else:
1005-
self._iter_gen = lambda: xrange(frames)
1005+
self._iter_gen = lambda: xrange(frames).__iter__()
10061006
self.save_count = frames
10071007

10081008
# If we're passed in and using the default, set it to 100.

‎matplotlibrc.template

Copy file name to clipboardExpand all lines: matplotlibrc.template
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,10 @@ backend : %(backend)s
380380
#savefig.edgecolor : white # figure edgecolor when saving
381381
#savefig.format : png # png, ps, pdf, svg
382382
#savefig.bbox : standard # 'tight' or 'standard'.
383+
# 'tight' is incompatible with pipe-based animation
384+
# backends but will workd with temporary file based ones:
385+
# e.g. setting animation.writer to ffmpeg will not work,
386+
# use ffmpeg_file instead
383387
#savefig.pad_inches : 0.1 # Padding to be used when bbox is set to 'tight'
384388
#savefig.jpeg_quality: 95 # when a jpeg is saved, the default quality parameter.
385389
#savefig.directory : ~ # default directory in savefig dialog box,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.