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

Skip to content

Commit 14aa6b4

Browse files
committed
Don't use deprecated get_texcommand in backend_pgf.
1 parent fb98a9a commit 14aa6b4

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/matplotlib/backends/backend_pgf.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,9 +1118,9 @@ def close(self):
11181118
open(self._outputfile, 'wb').close()
11191119

11201120
def _run_latex(self):
1121-
texcommand = get_texcommand()
1121+
texcommand = rcParams["pgf.texsystem"]
11221122
cmdargs = [
1123-
str(texcommand),
1123+
texcommand,
11241124
"-interaction=nonstopmode",
11251125
"-halt-on-error",
11261126
os.path.basename(self._fname_tex),
@@ -1182,12 +1182,11 @@ def _build_newpage_command(self, width, height):
11821182
so we need to check the lualatex version and use `\pagewidth` if
11831183
the version is 0.85 or newer
11841184
'''
1185-
texcommand = get_texcommand()
1185+
texcommand = rcParams["pgf.texsystem"]
11861186
if texcommand == 'lualatex' and _get_lualatex_version() >= (0, 85, 0):
11871187
cmd = r'\page'
11881188
else:
11891189
cmd = r'\pdfpage'
1190-
11911190
newpage = r'\newpage{cmd}width={w}in,{cmd}height={h}in%' + '\n'
11921191
return newpage.format(cmd=cmd, w=width, h=height).encode('utf-8')
11931192

0 commit comments

Comments
 (0)