Matplotlib PGF Backend with LuaLaTeX: Permission denied error

613 views Asked by At

Using the PGF backend for Matplotlib, a permission denied error is occurring when using LuaLaTeX as the texsystem.

The minimal example as follows:

import matplotlib as mpl

mpl.use('pgf')
mplparams = {
    "font.family": "serif",
    "text.usetex": True,
    "pgf.texsystem": "lualatex",
    "pgf.rcfonts": False,
    "pgf.preamble": [r"\usepackage{fourier}"]
}
mpl.rcParams.update(mplparams)

import matplotlib.pyplot as plt
plt.title("Example Plot")
plt.plot([1, 2, 3, 4, 5])

plt.savefig('output.pdf')

Gives me the following error:

This is LuaTeX, Version beta-0.76.0-2013062820 (rev 4627)
(c:/users/lholden/appdata/local/temp/mpl_pgf_5oh3zg/figure.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, afrikaans, ancientgreek, ara

<snip>

*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
(C:/Users/LHolden/AppData/Roaming/MiKTeX/2.9/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) ABD: EveryShipout initializing macroslualatex: Permission denied: c:/users/lho
lden/appdata/local/temp/mpl_pgf_5oh3zg/figure.pgf
lualatex: Data: c:/users/lholden/appdata/local/temp/mpl_pgf_5oh3zg/figure.pgf

I'm using 64-bit Python 2.7.8 from Anaconda 2.1.0, running Windows 8. luatex --version results in This is LuaTeX, Version beta-0.76.0-2013062820 (MiKTeX 2.9) (rev 4627). I am on version 1.4.2 of matplotlib.

Executing the same example within an administrator command prompt gave the same result. The same example with "pgf.texsystem": "lualatex" commented out completed succesfully, except only the numbers were in the font specified in the preamble - the text was still in the default font.

0

There are 0 answers