Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commitc6a80a5

Browse files
committed
Use the new pgf.documentclass rcParam
1 parent503c8cb commitc6a80a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎lib/matplotlib/backends/backend_pgf.py

Lines 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)fork,vinself._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)

[8]ページ先頭

©2009-2025 Movatter.jp