i want to compile several pgfplots pictures with lualatex, since it dynamically allocates memory for compiling (in contrast to pdflatex). In some plots, like my MWE.tex given below, i want to use a contour plot. This is typically done with gnuplot. To compile a document like this i need to use --shell-escape, such that gnuplot command can be executed while compiling the document.
\documentclass[a4paper]{article}
\usepackage[utf8]{luainputenc}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot3[contour gnuplot]
{x+y};
\end{axis}
\end{tikzpicture}
\end{document}
If i use
pdflatex --shell-escape MWE.tex
everything works fine, and the log says something along the lines
This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016) (preloaded format=pdflatex 2016.6.12) 13 JUN 2016 10:46
entering extended mode
\write18 enabled.
....
Package pgfplots notification 'compat/show suggested version=true': document has been generated with the most recent feature set (\pgfplotsset{compat=1.13}).
\openout3 = `MWE_contourtmp0.dat'.
\openout3 = `MWE_contourtmp0.script'.
runsystem(gnuplot "MWE_contourtmp0.script")...executed.
If i use lualatex --shell-escape MWE.tex i get the following error:
This is LuaTeX, Version 0.95.0 (TeX Live 2016) (format=lualatex 2016.6.12) 13 JUN 2016 10:52
system commands enabled.
...
Package pgfplots notification 'compat/show suggested version=true': document has
been generated with the most recent feature set (\pgfplotsset{compat=1.13}).
Package pgfplots info on input line 10: Using 'lua backend=false' for plot 0 (type 'contour external'): plot handler does not support LUA.
\openout3 = MWE_contourtmp0.dat
\openout3 = MWE_contourtmp0.script
gnuplot "MWE_contourtmp0.script"
! Package pgfplots Error: sorry, plot file{MWE_contourtmp0.table} could not be opened.
The .table file exists and looks identical to the one created by pdflatex, but it says that it cannot be executed.
(I just installed texlive 2016 yesterday, so everything should be up to date.)
\usepackage{shellesc}
.