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 6bac790

Browse filesBrowse files
committed
Merge pull request #6304 from jmc734/master
Updating animation file writer to allow keywork arguments when using `with` construct
2 parents 585d128 + 653e240 commit 6bac790
Copy full SHA for 6bac790

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
@@ -137,7 +137,7 @@ class AbstractMovieWriter(six.with_metaclass(abc.ABCMeta)):
137137
'''
138138

139139
@abc.abstractmethod
140-
def setup(self, fig, outfile, dpi, *args):
140+
def setup(self, fig, outfile, dpi):
141141
'''
142142
Perform setup for writing the movie file.
143143
@@ -163,13 +163,13 @@ def finish(self):
163163
'Finish any processing for writing the movie.'
164164

165165
@contextlib.contextmanager
166-
def saving(self, fig, outfile, dpi, *args):
166+
def saving(self, fig, outfile, dpi, *args, **kwargs):
167167
'''
168168
Context manager to facilitate writing the movie file.
169169
170170
All arguments are passed on to `setup`.
171171
'''
172-
self.setup(fig, outfile, dpi, *args)
172+
self.setup(fig, outfile, dpi, *args, **kwargs)
173173
yield
174174
self.finish()
175175

@@ -246,7 +246,7 @@ def frame_size(self):
246246
width_inches, height_inches = self.fig.get_size_inches()
247247
return width_inches * self.dpi, height_inches * self.dpi
248248

249-
def setup(self, fig, outfile, dpi, *args):
249+
def setup(self, fig, outfile, dpi):
250250
'''
251251
Perform setup for writing the movie file.
252252

0 commit comments

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