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:
- Installed successfully the gnuplot version 5.4 patchlevel 1
- On my TeXworks window went to Edit->Preference shown below:
- The TeXwrks preference window pops up. I hit on typesetting tab. In Processing tool section I hit on pdfLaTeX, as below:
- Then Hit on Edit... box. To get the tool configuration window as below:
- I hit on + box and type --shell-escape, as below:
- Using up-arrow I move the --shell-escape up on top of $fullname and hit ok:
- 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?