following this thread: gauss curves inside minipage and node I have the following working example with a very specific problem. I want to include the sigmas above the double arrows, but without the tick line (remove the \node lines to see what I am talking about), is it possible? Besides, I do not really understand the coordinates specified in the node lines (why can't the y coordinate of the node be 0.2 instead of -0.1 as in the corresponding double arrow?). Many thanks in advance! See the code below:
\documentclass[ignorenonframetext, xcolor={dvipsnames,table}]{beamer}
\mode<presentation> {
\usetheme{Berkeley}
\usecolortheme{dolphin}
\usepackage{tikz} %for transparency
\usetikzlibrary{positioning,shadows,calc}
\usepackage{pgfplots}
\pgfmathdeclarefunction{gauss}{2}{%
\pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%
}
}
\begin{document}
\begin{frame}
\begin{tikzpicture}
\begin{axis}[
no markers, domain=0:10, samples=100,
axis lines*=left, xlabel=\empty, ylabel=\empty,
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=3cm, width=4.25cm,
xtick={3,6}, ytick=\empty,
xticklabels={\tiny{$\mu$1},\tiny{$\mu$2}},
enlargelimits=false, clip=false, axis on top]
\addplot [fill=pink, draw=none, domain=3.75:4.5] {gauss(3,0.5)}
\closedcycle;
\addplot [fill=pink, draw=none, domain=3:4.5] {gauss(6,1)}
\closedcycle;
\addplot [cyan!50!black] {gauss(3,0.5)};
\addplot [cyan!50!black] {gauss(6,1)};
\addplot[<->] coordinates {(2.25,0.2) (3.75,0.2)};
\node[coordinate, pin={\tiny{$\sigma$1}}] at (axis cs: 3,-0.1){};
\addplot[<->] coordinates {(4.5,0.12) (7.5,0.12)};
\node[coordinate, pin={\tiny{$\sigma$2}}] at (axis cs: 6,-0.17){};
\end{axis}
\end{tikzpicture}
\end{frame}
\end{document}
coordinatenode with apinto place thesigmalabels? Why don't you just use something like\node at (axis cs: 6,0.12) [font=\tiny, inner sep=1pt, above] {$\sigma 2$};to place the node directly where you want it? – Jake Jun 23 '13 at 19:06