@@ -210,7 +210,7 @@ def saving(self, fig, outfile, dpi, *args, **kwargs):
210
210
"""
211
211
Context manager to facilitate writing the movie file.
212
212
213
- ``*args, **kw `` are any parameters that should be passed to `setup`.
213
+ ``*args, **kwargs `` are any parameters that should be passed to `setup`.
214
214
"""
215
215
if mpl .rcParams ['savefig.bbox' ] == 'tight' :
216
216
_log .info ("Disabling savefig.bbox = 'tight', as it may cause "
@@ -939,7 +939,7 @@ def _stop(self, *args):
939
939
940
940
def save (self , filename , writer = None , fps = None , dpi = None , codec = None ,
941
941
bitrate = None , extra_args = None , metadata = None , extra_anim = None ,
942
- savefig_kwargs = None , * , progress_callback = None ):
942
+ savefig_kwargs = None , * , progress_callback = None , ** kwargs ):
943
943
"""
944
944
Save the animation as a movie file by drawing every frame.
945
945
@@ -1006,6 +1006,11 @@ def func(current_frame: int, total_frames: int) -> Any
1006
1006
1007
1007
progress_callback = lambda i, n: print(f'Saving frame {i}/{n}')
1008
1008
1009
+ **kwargs :
1010
+ `AbstractMovieWriter` subclasses can specify additional parameters in their
1011
+ `~.AbstractMovieWriter.setup` methods. Additional keyword arguments
1012
+ are passed to these setup functions.
1013
+
1009
1014
Notes
1010
1015
-----
1011
1016
*fps*, *codec*, *bitrate*, *extra_args* and *metadata* are used to
@@ -1092,7 +1097,7 @@ def _pre_composite_to_white(color):
1092
1097
# canvas._is_saving = True makes the draw_event animation-starting
1093
1098
# callback a no-op; canvas.manager = None prevents resizing the GUI
1094
1099
# widget (both are likewise done in savefig()).
1095
- with (writer .saving (self ._fig , filename , dpi ),
1100
+ with (writer .saving (self ._fig , filename , dpi , ** kwargs ),
1096
1101
cbook ._setattr_cm (self ._fig .canvas , _is_saving = True , manager = None )):
1097
1102
if not writer ._supports_transparency ():
1098
1103
facecolor = savefig_kwargs .get ('facecolor' ,
0 commit comments