# Error even after enabling --shell-escape in TeXworks and installing gnuplots 5.4, when using gnuplot {4*x**2 - 5}

On my troubleshooting of the code got from page 42/571 of the pgfplots package:

\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.17}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot+ [id=parable,domain=-5:5,] gnuplot {4*x**2 - 5} node [pin=180:{$4x^2-5$}]{};
\end{axis}
\end{tikzpicture}
\end{document}


I followed the steps as below:

1. Installed successfully the gnuplot version 5.4 patchlevel 1
2. On my TeXworks window went to Edit->Preference shown below:
3. The TeXwrks preference window pops up. I hit on typesetting tab. In Processing tool section I hit on pdfLaTeX, as below:
4. Then Hit on Edit... box. To get the tool configuration window as below:
5. I hit on + box and type --shell-escape, as below:

1. Using up-arrow I move the --shell-escape up on top of $fullname and hit ok: 1. Then Run the code using pdfLaTeX getting the following error: ! Package pgfplots Error: Sorry, the gnuplot-result file 'f2_addplot_pgfplots_p p42.parable.table' could not be found. Maybe you need to enable the shell-escap e feature? For pdflatex, this is '>> pdflatex -shell-escape'. You can also invo ke '>> gnuplot .gnuplot' manually on the respective gnuplot file.. See the pgfplots package documentation for explanation. Type H for immediate help. ... l.8 ...t {4*x**2 - 5} node [pin=180:{$4x^2-5\$}]{};

Do you know how to fix it?

• Have you installed gnuplot at your PATH? Apr 11 at 6:34
• Yes Installed successfully the gnuplot version 5.4 patchlevel 1
– Aria
Apr 11 at 6:34
• I mean like in the picture (fnu.uni-hamburg.de/16917560/…)? Apr 11 at 6:36
• I did not check the box you highlighted. I try and let you know.
– Aria
Apr 11 at 6:38
• Nice to hear. Now you can get started Apr 11 at 6:59

If you want to combine gnuplot and LaTeX, you have to 1. install gnuplot at your PATH and 2. to run pdflatex with shell-escape, i.e. pdflatex -shell-escape ... or pdflatex --enable-write18 ...
The first point can be checked typing gnuplot --version and PATH in your cmd, which should return gnuplot ... patchlevel ... and a list of the elements in your PATH (something like C:\Program Files\gnuplot\bin). Therefore, it is the easiest way to enable the shown option during the installation of gnuplot.