8000 Explicitly define 'metadata' kwarg in '_print_figure' · matplotlib/matplotlib@06ad9fb · GitHub
[go: up one dir, main page]

Skip to content

Commit 06ad9fb

Browse files
committed
Explicitly define 'metadata' kwarg in '_print_figure'
1 parent a2d2c37 commit 06ad9fb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/matplotlib/backends/backend_ps.py

Lines 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