%20%E6%95%B0%E5%AD%97%E5%BA%8F%E5%88%97%E7%9A%84%E6%95%B0%E6%8D%AE%E7%BB%98%E5%88%B6%E6%9B%B2%E9%9D%A2%E5%9B%BE.png)
如何使用 addplor3 pgfplot 函数构建曲面,数据结构为 3 列,即 x、y、z 列。
\begin{tikzpicture}
\begin{axis}[
width=0.90\textwidth,
height=0.90\textwidth,
]
%
\addplot3[surf, draw=blue]
table[
x=XX,
y=YY,
z=ZZ,
col sep=comma]{3D.csv};%
\end{axis}
%
\end{tikzpicture}
其中 3D.csv 中的数据结构如下:
XX,YY,ZZ
0,0,0
1,1,0
2,2,0
3,3,0
0.5,0.5,1
1.5,1.5,1
2.5,2.5,1
3.5,3.5,1
0.75,0.75,2
1.75,1.75,2
2.75,2.75,2
3.75,3.75,2
上面的数据仅用于举例说明,下面是根据真实数据生成的图像。请注意,图像中有许多连接的线,而不是表面。