[Tex/LaTex] Beamer – aligning text and images in columns

beamer

I am making a slide with beamer where I would like to have 3 columns, each with an image and a caption underneath. The images are to be animated. While I got the images to align nicely, I'm having some difficulty with the captions. In particular, I am unable to position them under the image. Here is my code for the frame:

\frame{
\begin{column}{0.3 \textwidth}
\centering
    \includegraphics<1>[scale=.3]{subplotA1}    
    \includegraphics<2>[scale=.3]{subplotA2}    
    \includegraphics<3>[scale=.3]{subplotA3}    
caption A

\end{column}     
\begin{column}{0.3 \textwidth}
\centering
    \includegraphics<1>[scale=.3]{subplotB1}    
    \includegraphics<2>[scale=.3]{subplotB2}    
    \includegraphics<3>[scale=.3]{subplotB3}    
caption B
\end{column}     
\begin{column}{0.3 \textwidth}
\centering
    \includegraphics<1>[scale=.3]{subplotC1}    
    \includegraphics<2>[scale=.3]{subplotC2}    
    \includegraphics<3>[scale=.3]{subplotC3}    

    caption C

    \end{column}     

\end{columns}
}

Best Answer

One option would be to use \par before the captions (you can also leave a blank line in the code before the captions):

\PassOptionsToPackage{demo}{graphicx}
\documentclass{beamer}

\begin{document}

\begin{frame}
\begin{columns}
\begin{column}{0.3 \textwidth}
\centering
    \includegraphics<1>[width=\linewidth]{subplotA1}    
    \includegraphics<2>[width=\linewidth]{subplotA2}    
    \includegraphics<3>[width=\linewidth]{subplotA3}\par    
caption A
\end{column}     
\begin{column}{0.3 \textwidth}
\centering
    \includegraphics<1>[width=\linewidth]{subplotB1}    
    \includegraphics<2>[width=\linewidth]{subplotB2}    
    \includegraphics<3>[width=\linewidth]{subplotB3}\par
caption B
\end{column}     
\begin{column}{0.3 \textwidth}
\centering
    \includegraphics<1>[width=\linewidth]{subplotC1}    
    \includegraphics<2>[width=\linewidth]{subplotC2}    
    \includegraphics<3>[width=\linewidth]{subplotC3}\par    
caption C
\end{column}     
\end{columns}
\end{frame}

\end{document}

enter image description here

Since I didn't have the actual images, I changed the options for \includegraphics in my example.

The line

\PassOptionsToPackage{demo}{graphicx}

replaces actual images with black rectangles. Do not use that line in your actual code.