I was wondering if there is a way to have a figure in a slide that replace the previous figure. So if one has 5 figures then each figure will appear once and be replaced by the next figure. At the end of the slide, the last figure will be shown.
I have tried the following, but I am sure it's not the best way.
\begin{frame}
Here is an example.
\begin{example}
Let a finite sequence of real numbers be $(1,2,3,4,5,6,7,8,9,10)$.
\end{example}
\pause
\begin{minipage}{\textwidth}
\begin{itemize}
\item<1|only@1>\includegraphics[width=8cm]{figure1.png}
\item<2|only@2>\includegraphics[width=8cm]{figure2.png}
\item<3|only@3>\includegraphics[width=8cm]{figure3.png}
\item<4|only@4>\includegraphics[width=8cm]{figure4.png}
\item<5|only@5>\includegraphics[width=8cm]{figure5.png}
\end{itemize}
\end{minipage}
\end{frame}
The problem with above code is that the first figure is not shown and bullet points are also shown since it's a itemize environment.
I would appreciate any help or suggestion.
Thank you.