Skip to content

Commit 98673a0

Browse files
committed
PGF: Remove unnecessary _usepackage_if_not_loaded
1 parent 8bf18f2 commit 98673a0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

lib/matplotlib/backends/backend_pgf.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
DOCUMENTCLASS = r"\documentclass{article}"
3333

34+
3435
# Note: When formatting floating point values, it is important to use the
3536
# %f/{:f} format rather than %s/{} to avoid triggering scientific notation,
3637
# which is not recognized by TeX.
@@ -47,17 +48,13 @@ def _get_preamble():
4748
# Use displaystyle for all math.
4849
r"\everymath=\expandafter{\the\everymath\displaystyle}",
4950
# Set up font sizes to match font.size setting.
50-
r"\makeatletter",
5151
r"\IfFileExists{scrextend.sty}{",
52-
r" %s" % mpl.texmanager._usepackage_if_not_loaded(
53-
"scrextend", option="fontsize=%fpt" % font_size_pt
54-
),
52+
r" \usepackage[fontsize=%fpt]{scrextend}" % font_size_pt,
5553
r"}{",
5654
r" \renewcommand{\normalsize}{\fontsize{%f}{%f}\selectfont}"
5755
% (font_size_pt, 1.2 * font_size_pt),
5856
r" \normalsize",
5957
r"}",
60-
r"\makeatother",
6158
# Allow pgf.preamble to override the above definitions.
6259
mpl.rcParams["pgf.preamble"],
6360
*([

0 commit comments

Comments
 (0)