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 06ad9fb

Browse filesBrowse files
committed
Explicitly define 'metadata' kwarg in '_print_figure'
1 parent a2d2c37 commit 06ad9fb
Copy full SHA for 06ad9fb

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+4
-2
lines changed

‎lib/matplotlib/backends/backend_ps.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_ps.py
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ def _print_ps(self, outfile, format, *args, **kwargs):
965965

966966
def _print_figure(self, outfile, format, dpi=72, facecolor='w', edgecolor='w',
967967
orientation='portrait', isLandscape=False, papertype=None,
968-
**kwargs):
968+
metadata=None, **kwargs):
969969
"""
970970
Render the figure to hardcopy. Set the figure patch face and
971971
edge colors. This is useful because some of the GUIs have a
@@ -978,6 +978,9 @@ def _print_figure(self, outfile, format, dpi=72, facecolor='w', edgecolor='w',
978978
979979
If outfile is a file object, a stand-alone PostScript file is
980980
written into this file object.
981+
982+
metadata must be a dictionary. Currently, only the value for
983+
the key 'Creator' is used.
981984
"""
982985
isEPSF = format == 'eps'
983986
passed_in_file_object = False
@@ -1060,7 +1063,6 @@ def write(self, *kl, **kwargs):
10601063
self.figure.set_edgecolor(origedgecolor)
10611064

10621065
# check for custom metadata
1063-
metadata = kwargs.pop("metadata", None)
10641066
if metadata is not None and 'Creator' in metadata:
10651067
creator_str = metadata['Creator']
10661068
else:

0 commit comments

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