我在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
选项。尝试过 - 没有用。