2

I am very new to tikz and I would like to draw the following picture enter image description here

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. enter image description here

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

1

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}

Surface plot with plane

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.