# How to keep the vertical position of pictures in a presentation

I like to have the pictures in the following presentation each on the same position. Unfortunately the position changes after the second slide.

How to keep the (vertical) position? Pictures are all the same size.

\PassOptionsToPackage{demo}{graphics}
\documentclass{beamer}

\begin{document}

\begin{frame}
\only<1>{\includegraphics[width=\textwidth]{pic1}}
\only<2>{\includegraphics[width=\textwidth]{pic2}}
\only<3>{\includegraphics[width=\textwidth]{pic3}}
\only<4>{\includegraphics[width=\textwidth]{pic4}}
\transduration<1-4>{1}
\end{frame}

\end{document}

-
Try to add [t] to \begin{frame}, the result is then \begin{frame}[t] –  yo' Nov 5 '12 at 15:50

If you use [t] as the optional argument for frame, the images will be all aligned to the top of the frame. Another option, with alignment not necessarily to the top, would be to use an overprint environment, as the following example illustrates:

\PassOptionsToPackage{demo}{graphics}
\documentclass{beamer}

\begin{document}

\begin{frame}
\begin{overprint}
\only<1>{\includegraphics[width=\textwidth]{pic1}}
\only<2>{\includegraphics[width=\textwidth]{pic2}}
\only<3>{\includegraphics[width=\textwidth]{pic3}}
\only<4>{\includegraphics[width=\textwidth]{pic4}}
\transduration<1-4>{1}
\end{overprint}
\end{frame}

\end{document}

-
Thank you @Gonzalo. I had still the same effect in the last slide, when used overprint in my real file. The mistake i made: I had a blank line before \transduration. After deleting this line your code worked well. –  schmendrich Nov 6 '12 at 11:04