我无法编译该代码:
\documentclass[border=5mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.16}%
\begin{document}
\begin{tikzpicture}%
\begin{axis}[view={0}{90}]%
\addplot3[contour gnuplot]%
coordinates {
(0,0,0) (1,0,0) (2,0,0) (3,0,0)
(0,1,0) (1,1,0.6) (2,1,0.7) (3,1,0.5)
(0,2,0) (1,2,0.7) (2,2,0.8) (3,2,0.5)
};
\end{axis}%
\end{tikzpicture}%
\end{document}
首先我收到一条错误消息plot file{test2_contourtmp0.table} could not be opened
。按照 pgfplots 手册第 4.3.5 节,我--shell-escape
在编译时添加了选项,但错误仍然存在。我正在使用 TexWorks,添加了选项$synctexoption --shell-escape $fullname
。如果有人能帮忙,谢谢