Beamer only and visible

\begin{frame}{Convex polygon \& concave polygon}
\begin{definition}
A \textbf{convex} polygon has all its diagonals inside the polygon. \\
A \textbf{concave} polygon has at least one diagonal outside the polygon.
\end{definition}
\only<2>{ \includegraphics[width=\textwidth]{concave_convex.pdf} }
\only<3>{ \includegraphics[width=\textwidth]{concave_convex_ans.pdf} }
\end{frame}


At the moment, the 1st slide does not take account into the space occupied by the graph, as shown below:

How can I make sure that the first slide takes account into the graph, so that the definition is NOT vertically centered.

Thanks.

Edit: it seems that the simplest solution is add option [t] to the frame:

    \documentclass{beamer}

\begin{document}
\begin{frame}[t]{Convex polygon \& concave polygon}
\begin{definition}
A \textbf{convex} polygon has all its diagonals inside the polygon. \\
A \textbf{concave} polygon has at least one diagonal outside the polygon.
\end{definition}
\bigskip
\centering
\only<2>{\includegraphics[width=0.5\textwidth]{example-image-a}}
\only<3>{\includegraphics[width=0.7\textwidth]{example-image-b}}

\end{frame}
\end{document}


• It occupies both space of the two graphs instead of just the first one. – Chen Stats Yu Dec 20 '15 at 22:19
• You can first split the graphics area with \minipage. – diadochos Apr 24 at 2:40