I am trying to create a contour plot with PGFPlots in VSCode. I am using the LaTeX Workshop extension. I have gnuplot installed. Also in case it matters, I am using Windows Subsystem for Linux 1 (WSL1). I have enabled shell escape too (and I know it is working because I've compiled files with the minted
package just fine). Lastly, I am compiling with LuaLaTeX.
I have a main tex file and in that I have something like this
\begin{figure}[H]
\centering
\begin{tikzpicture}
\begin{axis}[
xlabel = {X},
ylabel = {Y}
]
\addplot3 [
contour gnuplot
] table {Code/Data.dat};
\end{axis}
\end{tikzpicture}
\end{figure}
When I try to compile I get an error that main_contourtmp0.table
could not be opened. That's because it is not being created. I can see that main_contourtmp0.dat
and main_contourtmp0.script
are both there in my file directory.
It seems that Latex Workshop cannot find gnuplot.
Any suggestions or thoughts on how I can correct it?
There is an env
variable in the recipes
section of LaTeX Workshop. Maybe I could append a path to /usr/local/bin/gnuplot
or something like that?
pdflatex
and I get the error. Even though I have shell escape enabled, it can't find gnuplot, despite gnuplot being in thePATH
. Really stumped here.