I would like to make an animation using beamer. A picture should replace another during the transition. I have a problem that the text will move its position during this animation. I have tried \only and \onslide but the question is not solved.
\begin{frame}{}
\onslide<1->{some text }
\onlide<1>{
\begin{figure}[H]
\centering
\includegraphics[width=4in]{Figures/fig1.pdf}
\label{fig2}
\end{figure}
}
\onslide<2->{
\begin{figure}[H]
\centering
\includegraphics[,width=4in]{Figures/fig2.pdf}
\label{fig2}
\end{figure}
}
\end{frame}
The position of "some text" moves during animation.