答案1
例如:
\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.8}
\usepackage{amsmath}
\begin{document}
\pgfplotsset{
compat=1.8,
colormap={whitered}{color(0cm)=(white); color(1cm)=(orange!75!red)}
}
\begin{tikzpicture}
\begin{axis}[
colormap name=whitered,
3d box,
width=15cm,
view={25}{25},
enlargelimits=false,
grid=major,
domain=-5:5,
y domain=-5:5,
zmin=-1,zmax=1,
samples=51,
xlabel=$x$,
ylabel=$y$,
zlabel=$z$,
]
\addplot3 [surf, unbounded coords=jump]
{ -exp(-(x*x+y*y)/2) };
\end{axis}
\end{tikzpicture}
\end{document}
如果你添加
\node at (axis cs: 1,1,0) [blue, circle, shading=ball]{};
你可以有: