When I try to compile this code example from Command Prompt (cmd) in Windows 10, with MiKTeX and with the following command:

pdflatex.exe -synctex=1 -interaction=nonstopmode -shell-escape pgfplotstest.tex

pdflatex fails to compile the complete example and only gived me a pdf with the grid, the axis and the labels but not with the actual plots. In the log file, I'm getting the following warnings:

runsystem(gnuplot pgfplotstest.x.gnuplot)...executed.

Package pgf Warning: Plot data file `pgfplotstest.x.table' not found. on input 
line 17.

\openout3 = `pgfplotstest.sin.gnuplot'.

runsystem(gnuplot pgfplotstest.sin.gnuplot)...executed.

Package pgf Warning: Plot data file `pgfplotstest.sin.table' not found. on inpu
t line 19.

\openout3 = `pgfplotstest.exp.gnuplot'.

runsystem(gnuplot pgfplotstest.exp.gnuplot)...executed.

Package pgf Warning: Plot data file `pgfplotstest.exp.table' not found. on inpu
t line 21.

but I'm not getting any errors. The following files are generated:


Gnuplot is installed and added to my PATH, and the document compiles fine in Git Bash using the same command. Why does it fail to compile in cmd?

1 Answer 1


I turned out that the Windows installer for Gnuplot adds an extra ";" in PATH if you check the checkbox to add Gnuplot to path, resulting in the path to Gnuplot being preceded by not one but two semicolons in PATH, which probably made cmd unable to recognize gnuplot as an executable.

Removing the extra semicolon (by going to "System Properties->Environment Variables...", clicking Path under System variables, then "Edit...->Edit text...") and restarting cmd resolved the problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .