[Tex/LaTex] Letting pictures appear in a presentation

beamer

Recently, I asked this question, about how to let bullets appear in a frame in a Latex Beamer document.

How would I do this with pictures? Say that I want a slide which contains one graph in the upper half and after clicking another graph appears in the lower half. The answer to my previous question does not help in this case, because there is no itemize/enumerate environment. Any help is appreciated!

Best Answer

Beamer implements an overlay specification to allow the usage of figures as overlays. The \includegraphics from graphicx package (auto loaded by Beamer) is expanded to

\includegraphics<number>[options]{graphicfilename}

It works like the \item<> on itemize environment, for instance. A basic example:

\documentclass{beamer}
\usetheme{Darmstadt}
\begin{document}
\begin{frame}{Only one frame}
    \begin{figure}
        \includegraphics<1>[width=.8\textwidth]{example-image-a}
        \includegraphics<2>[width=.5\textwidth]{example-image-b}
    \end{figure}
\end{frame}
\end{document}
Related Question