# Draw a surface using Tikz

I am very new to tikz and I would like to draw the following picture

I attempted and here what I got

\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.8}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
]
\addplot3[
surf,
shader=interp,
domain=-1:1,
domain y=-1.3:1.3,
]
{exp(-x^2-y^2)};
\end{axis}
\end{tikzpicture}
\end{document}


here is the picture i got but I am stuck on how to use only one color and place a plane on the top of the surface.

Any help would be greatly appreciated. Thank you for your time !

## 1 Answer

Here is something - just to get you started.

\documentclass[border=10pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.8}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
]
\addplot3[
surf,
colormap/blackwhite,
shader=interp,
domain=-1:1,
domain y=-1.3:1.3,
]
{exp(-x^2-y^2)};
\addplot3[fill=magenta, opacity=0.5]
coordinates{
(-1,-1,1)
(-1,1,1)
(1,1,1)
(1,-1,1)
};
\end{axis}
\end{tikzpicture}
\end{document}