Gnuplot not recognized in TexStudio

2.3k views Asked by At

I use TexStudio 2.8.6 with MikTex 2.9 (full installation) in a Win-7 machine. So, gnuplottex package is available in the machine.

Problem

Can't get TexStudio to plot a simple graph with gnuplot + pgfplots in latex.

Problem description

I'm trying to plot the following with gnuplot in TexStudio:

1: \documentclass[]{article}
2: \usepackage{tikz}
3: \usepackage{pgfplots}
4: \pgfplotsset{compat=newest}
5:      
6: \begin{document}
7:  
8:     \begin{tikzpicture}
9:     \begin{axis}
10:        \addplot gnuplot[id=sin]{sin(x)};
11:    \end{axis}
12:    \end{tikzpicture}
13: 
14: \end{document}

TexStudio Messages:
Note the pdflatex path. I've tried with and without the -shell-escape option.

 Process started: pdflatex.exe -synctex=1 -interaction=nonstopmode -shell-escape "deleteme".tex
 'gnuplot' is not recognized as an internal or external command, operable program or batch file.
 Process exited with error(s)

TexStudio Log:

 Line 10: Package pgfplots Error: Sorry, the gnuplot-result file 'deleteme.sin.table' c>.gnuplot' manually on the respective gnuplot file.. gnuplot[id=sin]{sin(x)};
 Line 11: You have an axis with empty range (in direction y). Replacing it with a default range and clearing all plots.

What I want

Help solve this mystery pls! Googling the issue didn't yield much. -shell-escape option was mentioned. Tried it -- didn't work.

0

There are 0 answers