KristofferC / PGFPlotsX.jl

Plots in Julia using the PGFPlots LaTeX package
Other
301 stars 40 forks source link

Gnuplot + Lualatex #220

Open fredrikekre opened 4 years ago

fredrikekre commented 4 years ago

The example from the tests does not work if run with the default engine. Tests are run with pdflatex, and that works for me locally too.

expr = "-2.051^3*1000./(2*3.1415*(2.99*10^2)^2)/(x^2*cos(y)^2)"
@pgf p = Axis({
    colorbar,
    xlabel = "x",
    ylabel = "y",
    domain = "1:2",
    y_domain = "74:87.9",
    view = (0, 90),
    },
    Plot3({
        contour_gnuplot = {
        number = 30,
        labels = false},
        thick,
        samples = 40,
        },
        Expression(expr)
    )
)

which generates the following tex

\begin{axis}[colorbar, xlabel={x}, ylabel={y}, domain={1:2}, y domain={74:87.9}, view={0}{90}]
    \addplot3[contour gnuplot={number={30}, labels={false}}, thick, samples={40}]
        {-2.051^3*1000./(2*3.1415*(2.99*10^2)^2)/(x^2*cos(y)^2)};
\end{axis}

The following command is beeing run:

┌ Debug: running latex command `lualatex --shell-escape jl_i6ti3V.tex` in dir /tmp
└ @ PGFPlotsX /home/fredrik/.julia/packages/PGFPlotsX/aPgqG/src/build.jl:48

and running that same command from my shell works! I think it is related to pgfplots chaning directories when compiling.

tpapp commented 4 years ago

It works for me with both the LUALATEX and the PDFLATEX engines, on Ubuntu 20.04.

$ pdflatex -version
pdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian)
kpathsea version 6.3.1

$ lualatex -version
This is LuaTeX, Version 1.10.0 (TeX Live 2019/Debian)

Can you please provide

  1. the versions of gnuplot, pdflatex, lualatex,
  2. the value of your default PGFPlotsX.latexengine() (which, I assume, produces the error),
  3. the full TeX file (pgfsave("/some/path.tex", ...))