I have the following code that plots 2D functions in a 3D plot.
\documentclass[border=3pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.10}
\usepackage{tikz-3dplot}
\pgfmathdeclarefunction{normal}{2}{%
\pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%
}
\begin{document}
\begin{tikzpicture}
\begin{axis}[samples=30,
domain=15:25,
xlabel={$x$},
zmin=0,zlabel={$z$},
samples y=0, ytick={7,8,9,10},ylabel={$y$},
area plot/.style={
fill opacity=0.75,
draw=none,
fill=blue!70,
mark=none,
smooth
}
]
\addplot3 [area plot] (x,10,{normal(20,1)});
\addplot3 [area plot] (x,9,{normal(20,1)});
\addplot3 [area plot] (x,8,{normal(20,1)});
\addplot3 [area plot] (x,7,{normal(20,1)});
\end{axis}
\end{tikzpicture}
\end{document}
However I want to swap the x and y-axis. I want to to have for every x-value a normal curve along the y-axis. Is this possible?