
답변1
이것은 당신에게 시작을 제공하기 위한 것입니다.
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{3d}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}[declare function={%
f(\x,\y)=(1/(2*pi))*exp(-pow(\x-1,2)/2-pow(\y-1,2)/2);}]
\begin{axis}[zmax=1/pi,zmin=-1/pi,colormap/viridis]
\begin{scope}[canvas is xy plane at z=-1/pi]
\draw[color of colormap=900] (1,1) circle[radius=0.5];
\draw[color of colormap=700] (1,1) circle[radius=1];
\draw[color of colormap=500] (1,1) circle[radius=1.5];
\draw[color of colormap=300] (1,1) circle[radius=2];
\draw[color of colormap=100] (1,1) circle[radius=2.5];
\end{scope}
\addplot3[color=red,thick,samples y=0,domain=-2:4] (x,4,{f(x,1)});
\addplot3[color=blue,thick,samples y=0,domain=-2:4] (-2,x,{f(1,x)});
\addplot3[mesh,domain=-2:4,domain y=-2:4] {f(x,y)};
\addplot3[color=red,thick,samples y=0,domain=4:-2] (x,1,{f(x,1)})
-- (-2,1,{f(1,1)}); ;
\addplot3[color=blue,thick,samples y=0,domain=-2:4] (1,x,{f(1,x)}) --
(1,4,{f(1,1)});
\end{axis}
\end{tikzpicture}
\end{document}
답변2
우선 코더 시작을 도와준 Schrondinger 고양이에게 정말 감사드립니다. pgfplot을 생성했습니다.
]2