diff --git a/lib/matplotlib/animation.py b/lib/matplotlib/animation.py index 295d60d8501f..9854ca2527f6 100644 --- a/lib/matplotlib/animation.py +++ b/lib/matplotlib/animation.py @@ -399,9 +399,9 @@ class FFMpegFileWriter(FileMovieWriter, FFMpegBase): def _args(self): # Returns the command line parameters for subprocess to use # ffmpeg to create a movie using a collection of temp images - return [self.bin_path(), '-vframes', str(self._frame_counter), - '-r', str(self.fps), '-i', - self._base_temp_name()] + self.output_args + return [self.bin_path(), '-i', self._base_temp_name(), + '-vframes', str(self._frame_counter), + '-r', str(self.fps)] + self.output_args # 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, self._iter_gen = lambda: iter(frames) self.save_count = len(frames) else: - self._iter_gen = lambda: xrange(frames) + self._iter_gen = lambda: xrange(frames).__iter__() self.save_count = frames # If we're passed in and using the default, set it to 100. diff --git a/matplotlibrc.template b/matplotlibrc.template index 44f94fdfd95d..c43e43c216d2 100644 --- a/matplotlibrc.template +++ b/matplotlibrc.template @@ -372,7 +372,11 @@ backend : %(backend)s #savefig.facecolor : white # figure facecolor when saving #savefig.edgecolor : white # figure edgecolor when saving #savefig.format : png # png, ps, pdf, svg -#savefig.bbox : standard # 'tight' or 'standard'. +#savefig.bbox : standard # 'tight' or 'standard' + # 'tight' is incompatible with pipe-based animation + # backends but will work with temporary file based ones: + # e.g. setting animation.writer to ffmpeg will not work, + # use ffmpeg_file instead #savefig.pad_inches : 0.1 # Padding to be used when bbox is set to 'tight' #savefig.jpeg_quality: 95 # when a jpeg is saved, the default quality parameter. #savefig.directory : ~ # default directory in savefig dialog box,