1

我在 Win-7 机器上使用TexStudio 2.8.6MikTex 2.9(完全安装) 。因此,gnuplottex机器中提供了包。

问题

无法让 TexStudio 用gnuplot + pgfplotsin绘制一个简单的图形latex

问题描述

我正在尝试gnuplot在 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
记下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)

特克斯工作室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提到了选项。试过了——没用。

4

0 回答 0