在TexStudio中无法识别Gnuplot

时间:2014-11-28 13:37:49

标签: latex gnuplot pdflatex tikz pgf

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

问题

无法让TexStudio在gnuplot + pgfplots中使用latex绘制简单图表。

问题描述

我试图在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 Messages
请注意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.

我想要什么

帮助解决这个谜团吧! 谷歌搜索这个问题并没有带来太多收益。提到了-shell-escape选项。尝试过 - 没有用。

0 个答案:

没有答案