无法使用 pgfplots 从 MATLAB 绘制冲浪图

无法使用 pgfplots 从 MATLAB 绘制冲浪图

无论出于什么原因,我都无法想出我无法绘制我在 MATLAB 中生成的冲浪图,然后使用可用的脚本转换为 tikz这里。我收到以下错误:

!软件包 pgfkeys 错误:我不知道密钥“/tikz/axis lines”,我将忽略它。也许您拼错了。

!软件包 pgfkeys 错误:我不知道密钥“/tikz/surf”,我将忽略它。也许您拼错了。

!软件包 pgfkeys 错误:我不知道密钥“/tikz/colormap/jet”,我将忽略它。也许您拼错了。

!软件包 pgfkeys 错误:我不知道密钥“/tikz/shader”,我将忽略它。也许你拼错了。

我最初以为这是因为我使用的 tikz/pgsplots 版本,但我下载了最新版本并且现在正在使用它们,但仍然出现同样的错误......

有趣的是,使用相同“未知”标签(即:\begin{axis})的其他图表运行良好。

这是我正在尝试编译的代码。猜猜看?

\documentclass{article}

\usepackage{/tmp/pgf_2.10.tds/tex/latex/pgf/frontendlayer/tikz}
\usepackage{/vol/vssp/mesh-animation/Documents/Publications/TVCG2012/extraevaluation/LaTeX/pgfplots_1.5.1/tex/latex/pgfplots/pgfplots}

\newlength\figureheight 
\newlength\figurewidth 
\setlength\figureheight{6cm} 
\setlength\figurewidth{6cm}

\begin{document}
\begin{tikzpicture}

\begin{axis}[
view={64}{26},
width=\figurewidth,
height=\figureheight,
scale only axis,
xmin=1, xmax=11,
xmajorgrids,
ymin=1, ymax=11,
ymajorgrids,
zmin=275, zmax=320,
zmajorgrids,
axis lines=left,
grid=none]

\addplot3[
surf,
opacity=0.5,
colormap/jet,
shader=faceted]
coordinates{ 
(1,1,317.78)(1,2,313.118)(1,3,308.644)(1,4,304.398)(1,5,300.435)(1,6,296.847)(1,7,293.804)(1,8,291.48)(1,9,290.175)(1,10,290.13)(1,11,291.368)

(2,1,313.066)(2,2,308.339)(2,3,303.818)(2,4,299.548)(2,5,295.597)(2,6,292.067)(2,7,289.147)(2,8,286.993)(2,9,285.917)(2,10,286.203)(2,11,287.879)

(3,1,308.557)(3,2,303.803)(3,3,299.283)(3,4,295.054)(3,5,291.201)(3,6,287.85)(3,7,285.172)(3,8,283.275)(3,9,282.451)(3,10,283.034)(3,11,285.119)

(4,1,304.275)(4,2,299.54)(4,3,295.084)(4,4,290.979)(4,5,287.331)(4,6,284.248)(4,7,281.877)(4,8,280.299)(4,9,279.764)(4,10,280.635)(4,11,283.095)

(5,1,300.253)(5,2,295.6)(5,3,291.288)(5,4,287.399)(5,5,284.021)(5,6,281.256)(5,7,279.238)(5,8,278.021)(5,9,277.839)(5,10,279.029)(5,11,281.83)

(6,1,296.547)(6,2,292.054)(6,3,287.964)(6,4,284.349)(6,5,281.291)(6,6,278.878)(6,7,277.241)(6,8,276.432)(6,9,276.662)(6,10,278.21)(6,11,281.344)

(7,1,293.183)(7,2,288.92)(7,3,285.106)(7,4,281.814)(7,5,279.117)(7,6,277.095)(7,7,275.878)(7,8,275.519)(7,9,276.207)(7,10,278.174)(7,11,281.647)

(8,1,290.351)(8,2,286.358)(8,3,282.855)(8,4,279.909)(8,5,277.591)(8,6,275.979)(8,7,275.203)(8,8,275.312)(8,9,276.483)(8,10,278.879)(8,11,282.666)

(9,1,288.032)(9,2,284.347)(9,3,281.187)(9,4,278.618)(9,5,276.71)(9,6,275.536)(9,7,275.229)(9,8,275.835)(9,9,277.49)(9,10,280.298)(9,11,284.359)

(10,1,286.265)(10,2,282.921)(10,3,280.134)(10,4,277.975)(10,5,276.508)(10,6,275.805)(10,7,276.011)(10,8,277.127)(10,9,279.246)(10,10,282.397)(10,11,286.674)

(11,1,285.069)(11,2,282.101)(11,3,279.727)(11,4,278.015)(11,5,277.026)(11,6,276.847)(11,7,277.598)(11,8,279.215)(11,9,281.721)(11,10,285.143)(11,11,289.588)

};

\end{axis}
\end{tikzpicture}
\end{document} 

干杯!

相关内容