# Gaussian plots with filter plots using tikz

I am trying to get these plots:

and

Code:

\documentclass{article}
\usepackage{pgfplots}
\begin{document}

\pgfmathdeclarefunction{gauss}{2}{%
\pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%
}

\begin{tikzpicture}
\begin{axis}[
no markers, domain=0:10, samples=100,
axis lines*=left, xlabel=$score$, ylabel=$freq$,
every axis y label/.style={at=(current axis.above origin),anchor=south},
every axis x label/.style={at=(current axis.right of origin),anchor=west},
height=5cm, width=12cm,
xtick=\empty,
ytick=\empty,
enlargelimits=false,
clip=false,
axis on top,
grid = major
]

\end{axis}

\end{tikzpicture}
\end{document}


I would like some help to add the annotations and 2nd curves on each plots. Thanks for your help and time.

• One way is to use \pgfplotsextra. Another is to define named coordinates inside the axis environment, but not use them until after \end{axis}. Also (rel axis cs: x,y) coordinates. Sep 15, 2016 at 4:55

I would use node for the labels and drawing and scope for the second plot:

\documentclass[preview]{standalone}
\usepackage{pgfplots}
\begin{document}

\pgfmathdeclarefunction{gauss}{2}{%
\pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%
}

\begin{tikzpicture}
\begin{axis}[
no markers, domain=0:10, samples=100,
axis lines=left, xlabel=$score$, ylabel=$freq$,
every axis y label/.style={at=(current axis.above origin),anchor=south},
every axis x label/.style={at=(current axis.right of origin),anchor=west},
height=5cm, width=12cm,
xtick=\empty,
ytick=\empty,
enlargelimits=false,
clip=false,
axis on top,
grid = major
]
\node[align=center,anchor=south] at (axis cs: 6.5, 0.4){client\\scores};
\node[align=center,anchor=north] at (axis cs: 6.5, 0){client\\mean};
\draw[dashed] (axis cs: 6.5, 0.4) -- (axis cs: 6.5, 0);
\end{axis}

\begin{scope}[xshift=15cm]
\begin{axis}[axis lines=left,height=5cm, width=12cm,]