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 053bd76

Browse filesBrowse files
authored
Merge pull request #7207 from efiring/try_animation_context_v2
BUG: 'saving' context manager now passes all args, kw to setup.
2 parents dd589b3 + 137fd6d commit 053bd76
Copy full SHA for 053bd76

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+4
-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
@@ -169,7 +169,7 @@ def frame_size(self):
169169
width_inches, height_inches = self.fig.get_size_inches()
170170
return width_inches * self.dpi, height_inches * self.dpi
171171

172-
def setup(self, fig, outfile, dpi, *args):
172+
def setup(self, fig, outfile, dpi):
173173
'''
174174
Perform setup for writing the movie file.
175175
@@ -190,14 +190,14 @@ def setup(self, fig, outfile, dpi, *args):
190190
self._run()
191191

192192
@contextlib.contextmanager
193-
def saving(self, *args):
193+
def saving(self, *args, **kw):
194194
'''
195195
Context manager to facilitate writing the movie file.
196196
197-
``*args`` are any parameters that should be passed to `setup`.
197+
``*args, **kw`` are any parameters that should be passed to `setup`.
198198
'''
199199
# This particular sequence is what contextlib.contextmanager wants
200-
self.setup(*args)
200+
self.setup(*args, **kw)
201201
yield
202202
self.finish()
203203

0 commit comments

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