# Figure in beamer moves around

This is a MWE of my code:

\documentclass{beamer}

\usepackage{tikz}
\usetikzlibrary{shapes,arrows}

\mode<presentation> {
\usetheme{Frankfurt}
\usecolortheme{dolphin}
}

\begin{document}

\begin{frame}

\begin{columns}[c]

\column{.7\textwidth}
\only<1>{
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] at (0,0) {\includegraphics[width=0.9\textwidth]{fig.png}};
\end{tikzpicture}
}
\only<2>{
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] at (0,0) {\includegraphics[width=0.9\textwidth]{fig.png}};
\draw[green,thick,rounded corners] (4.8,5.2) ellipse (0.28 and 1.5);
\draw[->, line width=2pt, -triangle 60] (6.3,5.2) -- (5.2,5.2);
\end{tikzpicture}
}
\only<3>{
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] at (0,0) {\includegraphics[width=0.9\textwidth]{fig.png}};
\draw[green,thick,rounded corners] (5.8,3) ellipse (0.28 and 1.5);
\draw[->, line width=2pt, -triangle 60] (7.1,3) -- (6.1,3);
\end{tikzpicture}
}

\column{.35\textwidth}
\vspace{-1.cm}
\setbeamercolor{normal text}{fg=gray,bg=}
\usebeamercolor{normal text}
\begin{itemize}
\item \alert<+>{Some text goes here sdsdf sdfsdfsdfsdf.}\\[4ex]
\item \alert<+>{Some more text here sdfdsf.}\\[4ex]
\end{itemize}

\end{columns}

\end{frame}

\end{document}


This creates three slides with the same image:

It might not be noticeable when seen separate but the grey square does not maintain a fixed position within the slides. How do I get it to stop moving around?

Here's the grey square I use:

-
You might have a look to the answer of Beamer: problematic use of \visible and \only in combination with TikZ to draw a graph: it contains references to understand and solve the problem. –  Claudio Fiandrino Mar 12 '13 at 13:27
Thanks Claudio, I followed that answer and wrapped the code around an overlayarea environment and it worked. Want to make that into an answer so I can mark it as accepted? –  Gabriel Mar 12 '13 at 13:35
Well someone already provided an answer that also works. –  Gabriel Mar 12 '13 at 13:37
Perhaps also worth looking at tex.stackexchange.com/q/18704/86 –  Loop Space Mar 12 '13 at 13:46
@AndrewStacey: a pointer to that question is also present in the link I added :) I think for the OP all the references given there are of help to understand the problem. –  Claudio Fiandrino Mar 12 '13 at 14:08

As pointed out by Claudio, you should use \visible instead of \only if you don't want things to move around from one slide to the next:

\documentclass{beamer}

\usepackage{tikz}
\usetikzlibrary{shapes,arrows}

\mode<presentation> {
\usetheme{Frankfurt}
\usecolortheme{dolphin}
}

\begin{document}

\begin{frame}

\begin{columns}[c]

\column{.7\textwidth}
\begin{tikzpicture}
\node[anchor=south west,inner sep=0] at (0,0) {\includegraphics[width=0.9\textwidth]{fig.png}};
\visible<2>{
\draw[green,thick,rounded corners] (4.8,5.2) ellipse (0.28 and 1.5);
\draw[->, line width=2pt, -triangle 60] (6.3,5.2) -- (5.2,5.2);
}
\visible<3>{
\draw[green,thick,rounded corners] (5.8,3) ellipse (0.28 and 1.5);
\draw[->, line width=2pt, -triangle 60] (7.1,3) -- (6.1,3);
}
\end{tikzpicture}

\column{.35\textwidth}
\vspace{-1.cm}
\setbeamercolor{normal text}{fg=gray,bg=}
\usebeamercolor{normal text}
\begin{itemize}
\item \alert<+>{Some text goes here sdsdf sdfsdfsdfsdf.}\\[4ex]
\item \alert<+>{Some more text here sdfdsf.}\\[4ex]