Latex TexStudio中未识别Gnuplot

Latex TexStudio中未识别Gnuplot,latex,gnuplot,pdflatex,tikz,pgf,Latex,Gnuplot,Pdflatex,Tikz,Pgf,我在Win-7机器中使用TextStudio 2.8.6和MikTex 2.9(完全安装)。因此,gnuplottex包在机器中可用 问题 无法让TexStudio在latex中使用gnuplot+pgfplots绘制简单图形 问题描述 我试图在TexStudio中使用gnuplot绘制以下内容: 1: \documentclass[]{article} 2: \usepackage{tikz} 3: \usepackage{pgfplots} 4: \pgfplotsset{compat=ne

我在Win-7机器中使用TextStudio 2.8.6和MikTex 2.9(完全安装)。因此,
gnuplottex
包在机器中可用

问题 无法让TexStudio在
latex
中使用
gnuplot+pgfplots
绘制简单图形

问题描述 我试图在TexStudio中使用
gnuplot
绘制以下内容:

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
消息

请注意
pdflatex
路径。我试过使用和不使用
-shell escape
选项

 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.
我想要什么 请帮我解开这个谜!
谷歌搜索这一问题并没有产生多大效果<代码>-提到了外壳转义选项。尝试过--没有成功。

您的path变量中必须有gnuplot可执行文件的路径。@Christoph什么路径变量?何处?从文档中,您可能想尝试
\usepackage[miktex]{gnuplottex}
选项。@andyras做了。也没有运气。我是说Windows环境变量
PATH
。gnuplottex包只调用
gnuplot.exe
,但不知道它位于何处。该查找可能通过
PATH
中列出的目录完成。