Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca4f048

Browse files
committed
Define 'metadata' as kwarg in _print_figure_tex for consistency
1 parent 422f1ce commit ca4f048

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
@@ -1203,12 +1203,15 @@ def do_nothing():
12031203
os.chmod(outfile, mode)
12041204

12051205
def _print_figure_tex(self, outfile, format, dpi, facecolor, edgecolor,
1206-
orientation, isLandscape, papertype,
1206+
orientation, isLandscape, papertype, metadata=None,
12071207
**kwargs):
12081208
"""
12091209
If text.usetex is True in rc, a temporary pair of tex/eps files
12101210
are created to allow tex to manage the text layout via the PSFrags
12111211
package. These files are processed to yield the final ps or eps file.
1212+
1213+
metadata must be a dictionary. Currently, only the value for
1214+
the key 'Creator' is used.
12121215
"""
12131216
isEPSF = format == 'eps'
12141217
if is_string_like(outfile):
@@ -1264,7 +1267,6 @@ def write(self, *kl, **kwargs):
12641267
self.figure.set_edgecolor(origedgecolor)
12651268

12661269
# check for custom metadata
1267-
metadata = kwargs.pop("metadata", None)
12681270
if metadata is not None and 'Creator' in metadata:
12691271
creator_str = metadata['Creator']
12701272
else:

0 commit comments

Comments
 (0)