Latex gnuplot与osx中的texshop
我已经通过macports安装了gnuplot,但当我在texshop中编译latex文档时,它没有显示绘图,我在日志文件中得到以下错误:Latex gnuplot与osx中的texshop,latex,gnuplot,Latex,Gnuplot,我已经通过macports安装了gnuplot,但当我在texshop中编译latex文档时,它没有显示绘图,我在日志文件中得到以下错误: Package pgf Warning: Plot data file `tutorial.x.table' not found. on input line 17. Package pgf Warning: Plot data file `tutorial.sin.table' not found. on input li ne 19. Pack
Package pgf Warning: Plot data file `tutorial.x.table' not found. on input line
17.
Package pgf Warning: Plot data file `tutorial.sin.table' not found. on input li
ne 19.
Package pgf Warning: Plot data file `tutorial.exp.table' not found. on input li
ne 21.
我只是想编译这个基本示例:
% Author: Till Tantau
% Source: The PGF/TikZ manual
\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage{tikz}
% GNUPLOT required
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[domain=0:4]
\draw[very thin,color=gray] (-0.1,-1.1) grid (3.9,3.9);
\draw[->] (-0.2,0) -- (4.2,0) node[right] {$x$};
\draw[->] (0,-1.2) -- (0,4.2) node[above] {$f(x)$};
\draw[color=red] plot[id=x] function{x}
node[right] {$f(x) =x$};
\draw[color=blue] plot[id=sin] function{sin(x)}
node[right] {$f(x) = \sin x$};
\draw[color=orange] plot[id=exp] function{0.05*exp(x)}
node[right] {$f(x) = \frac{1}{20} \mathrm e^x$};
\end{tikzpicture}
\end{document}
是的,您需要将tikz创建的.gnuplot文件转换为表文件。对此,您有两种选择:
gnuplot test.exp.gnuplot
即可。(此处无法验证,因为我的gnuplot版本太旧。)