I have a tikz picture (of a Gaussian distribution in this case) and I want to unravel its labels gradually. Following some suggestions in this site I tried the following, but it doesn't work - it produces a single slide. Any help?
\documentclass{beamer}
\usepackage{pgfplots}
\usepackage{tikz}
\pgfplotsset{compat=1.10}
\usetikzlibrary{external}
\tikzexternalize
\begin{document}
\pgfmathdeclarefunction{gauss}{3}{%
\pgfmathparse{1/(#3*sqrt(2*pi))*exp(-((#1-#2)^2)/(2*#3^2))}%
}
\begin{frame}[t,fragile]{Test}
\begin{tikzpicture}
\begin{axis}[
no markers,
domain=0:6,
samples=100,
ymin=0,
axis lines*=left,
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,
hide y axis
]
\addplot [very thick,cyan!50!black] {gauss(x, 3, 1)};
\pgfmathsetmacro\valueA{gauss(1.96,3,1)}
\draw [gray] (axis cs:1,0) -- (axis cs:1,\valueA)
(axis cs:5,0) -- (axis cs:5,\valueA);
\draw [yshift=0.3cm, latex-latex](axis cs:1, 0) -- node [fill=white] {$95\%$} (axis cs:5, 0);
\only<1->{\node[below] at (axis cs:1, 0) {$h - 1.96\cdot se$}};
\only<2->{\node[below] at (axis cs:3, 0) {$h$}};
\only<3->{\node[below] at (axis cs:5, 0) {$h + 1.96\cdot se$}};
\end{axis}
\end{tikzpicture}
\end{frame}
\end{document}
external. Welcome to TeX.SX! – Sep 27 '15 at 19:03