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 db62b70

Browse filesBrowse files
committed
Use the new pgf.documentclass rcParam
1 parent faf747c commit db62b70
Copy full SHA for db62b70

File tree

1 file changed

+3
-3
lines changed
Filter options

1 file changed

+3
-3
lines changed

‎lib/matplotlib/backends/backend_pgf.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_pgf.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class LatexManager:
185185
@staticmethod
186186
def _build_latex_header():
187187
latex_header = [
188-
r"\documentclass{article}",
188+
mpl.rcParams["pgf.documentclass"],
189189
# Include TeX program name as a comment for cache invalidation.
190190
# TeX does not allow this to be the first line.
191191
rf"% !TeX program = {mpl.rcParams['pgf.texsystem']}",
@@ -815,7 +815,7 @@ def print_pdf(self, fname_or_fh, *, metadata=None, **kwargs):
815815
self.print_pgf(tmppath / "figure.pgf", **kwargs)
816816
(tmppath / "figure.tex").write_text(
817817
"\n".join([
818-
r"\documentclass[12pt]{article}",
818+
mpl.rcParams["pgf.documentclass"],
819819
r"\PassOptionsToPackage{pdfinfo={%s}}{hyperref}" % pdfinfo,
820820
r"\usepackage{hyperref}",
821821
r"\PassOptionsToPackage{%s}{geometry}" % geometry_options,
@@ -927,7 +927,7 @@ def _write_header(self, width_inches, height_inches):
927927
pdfinfo = ','.join(
928928
_metadata_to_str(k, v) for k, v in self._info_dict.items())
929929
latex_header = "\n".join([
930-
r"\documentclass[12pt]{article}",
930+
mpl.rcParams["pgf.documentclass"],
931931
r"\usepackage[pdfinfo={%s}]{hyperref}" % pdfinfo,
932932
r"\usepackage[papersize={%fin,%fin}, margin=0in]{geometry}"
933933
% (width_inches, height_inches),

0 commit comments

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