Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm trying to get pgfplots to work with gnuplot to get this answer to work (i.e. triangulate a surface from a set of points). Shell escape was already enabled since I use TikZ externalization. gnuplot is also added to the Windows PATH since I can run it from the command line.

However, when I run the following MWE it does not work and I get the following message in my .log:

runsystem(gnuplot TMP_latexTests.sin.gnuplot)...executed.

! Package pgfplots Error: Sorry, the gnuplot-result file 'TMP_latexTests.sin.ta
ble' could not be found. Maybe you need to enable the shell-escape feature? For
 pdflatex, this is '>> pdflatex -shell-escape'. You can also invoke '>> gnuplot
 <file>.gnuplot' manually on the respective gnuplot file..

See the pgfplots package documentation for explanation.
Type  H <return>  for immediate help.

l.12   gnuplot[id=sin]{sin(x)};

? x

It seems that gnuplot can be found and executes correctly, but no .table is created. The .gnuplot file is created and when I manually call gnuplot on this file the required .table is created, so that all works fine. I also checked and the .table file is not created in a nother location.


\usepackage{pgfplots}       % Charts in LaTeX, or, even better, in TikZ!!!

% Preamble: \pgfplotsset{width=7cm,compat=1.10}

Environment information:

  • Windows 7 64-bit Enterprise
  • gnuplot 4.6 patchlevel 0
  • MiKTeX 2.9
  • WinEdt 8.1 64-bit
  • pgfplots 1.10 / TikZ 3.0.0

So my question is, what other setting should I change in order to get pgfplots/MiKTeX to find my gnuplot executable? Or is there another issues I'm overlooking?

share|improve this question
Why do you use a figure environment in a standalone document? Beside this: you example works fine for me. Did you check if the table-file has really not been created (that pdflatex can't find it can have other reasons). Did you run pdflatex --shell-escape file on the command line? –  Ulrike Fischer Apr 28 at 8:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.