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

Commit02b6504

Browse files
committed
Avoiding to use rf and multiline
1 parent07b7d71 commit02b6504

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎lib/matplotlib/backends/backend_pgf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,11 +828,11 @@ def print_pdf(self, fname_or_fh, *, metadata=None, **kwargs):
828828
# print figure to pgf and compile it with latex
829829
withTemporaryDirectory()astmpdir:
830830
tmppath=pathlib.Path(tmpdir)
831+
docclass=mpl.rcParams.get("pgf.documentclass","article")
831832
self.print_pgf(tmppath/"figure.pgf",**kwargs)
832833
(tmppath/"figure.tex").write_text(
833834
"\n".join([
834-
rf"\documentclass{{{mpl.rcParams.get(
835-
'pgf.documentclass','article')}}}",
835+
r"\\documentclass{{{docclass}}}"
836836
r"\usepackage[pdfinfo={%s}]{hyperref}"%pdfinfo,
837837
r"\usepackage[papersize={%fin,%fin}, margin=0in]{geometry}"
838838
% (w,h),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp