Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Updating animation file writer to allow keywork arguments when using `with` construct #6304
Conversation
mdboom
added the
needs_review
label
Apr 14, 2016
tacaswell
and 2 others
commented on an outdated diff
Apr 14, 2016
| @@ -246,7 +246,7 @@ def frame_size(self): | ||
| width_inches, height_inches = self.fig.get_size_inches() | ||
| return width_inches * self.dpi, height_inches * self.dpi | ||
| - def setup(self, fig, outfile, dpi, *args): | ||
| + def setup(self, fig, outfile, dpi, *args, **kwargs): |
tacaswell
Owner
|
|
Other than @tacaswell 's comment, it's a |
tacaswell
added this to the
2.1 (next point release)
milestone
Apr 29, 2016
tacaswell
merged commit 6bac790
into matplotlib:master
Apr 29, 2016
tacaswell
removed the
needs_review
label
Apr 29, 2016
|
Thanks! @jmc734 I think this is your first contribution to mpl. Congratulations and hopefully we will see you again |
|
@tacaswell, may I backport this? I view it as fixing a rather frustrating bug, which I tripped over and reported in #7191. |
efiring
referenced
this pull request
Sep 28, 2016
Closed
BUG: Animation bugs fixed in master should be backported to 2.x #7191
efiring
added a commit
to efiring/matplotlib
that referenced
this pull request
Sep 30, 2016
|
|
efiring |
137fd6d
|
jmc734 commentedApr 14, 2016
Previously, in order to pass configurations to
saving()and subsequentlysetup(), the caller had to provide positional arguments. There is nothing explicitly wrong with that approach though thesaving()method is currently advertised as taking the same parameters assetup(). For example, if you wanted to disable temporary file clearing for a FileMovieWriter, you previously would not have been able to structure it like this:Instead, you would have to know the order of the arguments and make the call like so:
This is a small change but I think it makes code easier to read and more tolerant to future API change.