Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have a figure which consists of 4 plots, Full figure here, and I want to have them appearing one by-one in the presentation (from left to right, top to bottom). I managed to do this by including each plot separately using a combination of \subfloat and \pause:

\begin{frame} \frametitle{Cufflinks analysis - SRSF1}
  \begin{figure}[t]
    \centering
     \captionsetup[subfloat]{labelformat=empty}
      \subfloat[]{\label{} \includegraphics[scale = 0.20]{Image1.pdf}} 
      \pause \subfloat[]{\label{} \includegraphics[scale = 0.20]{Image2.pdf}}\\
      \pause \subfloat[]{\label{} \includegraphics[scale = 0.20]{Image3.pdf}}
      \pause \subfloat[]{\label{} \includegraphics[scale = 0.20]{Image4.pdf}}
  \end{figure}
\end{frame}

[edit] Result: example

The issue with this solution is that the vertical spacing between the rows of images is rather large. I would like to reduced it in order to increase the size of each image - better use of space really.

If someone has a simple alternative where all 4 plots are part of a single image and each part is uncovered when needed it would be great.

Be gentle, this is my 1st beamer presentation.

share|improve this question
    
If the images aren't subject to change, you can probably achieve it by generating 4 big images corresponding to each step of the display : first with 1 image + 3 blank squares, second with 2 images + 2 blanks, etc. You can then use the \only<...> syntax to display them sequentially. –  T. Verron Sep 22 '12 at 11:52
    
Interesting. And how would I go about creating/overlaying the blank squares? –  fridaymeetssunday Sep 22 '12 at 12:08
    
You could use the image editor of your choice for that, but percusse's answer below is way more elegant and easy to set up. –  T. Verron Sep 22 '12 at 13:18
    
Splitting an image might be useful for you. –  Who is crazy first Sep 22 '12 at 19:24

2 Answers 2

up vote 8 down vote accepted

It's not much different than what you have already.

\documentclass{beamer}
\usepackage{mwe} % For dummy images
\usepackage{lmodern} % To suppress some warnings

\begin{document}
\begin{frame}
\centering
\begin{tabular}{c@{}c}
 \includegraphics[width=0.4\textwidth,trim=0 120 160 0,clip]{example-image-a}\pause% 
&\includegraphics[width=0.4\textwidth,trim=160 120 0 0,clip]{example-image-a}\\[-1.5mm]\pause%
 \includegraphics[width=0.4\textwidth,trim=0 0 160 120,clip]{example-image-a}\pause%
&\includegraphics[width=0.4\textwidth,trim=160 0 0 120,clip]{example-image-a}
\end{tabular}

\end{frame}
\end{document}

enter image description here

The trimming might not be good as I did it by eyeballing.

EDIT For the custom image, the following trim values seem to work.

\documentclass{beamer}
\usepackage{graphicx}
\usepackage{lmodern} % To suppress some warnings

\begin{document}
\begin{frame}
\centering
\begin{tabular}{c@{}c}
 \includegraphics[width=0.3\textwidth,trim=0 270 260 0,clip]{SRSF1_details_1fig}\pause% 
&\includegraphics[width=0.3\textwidth,trim=260 270 0 0,clip]{SRSF1_details_1fig}\\[-1.5mm]\pause%
 \includegraphics[width=0.3\textwidth,trim=0 0 260 265,clip]{SRSF1_details_1fig}\pause%
&\includegraphics[width=0.3\textwidth,trim=260 0 0 265,clip]{SRSF1_details_1fig}
\end{tabular}

\end{frame}
\end{document}

enter image description here

share|improve this answer
    
How did you find -1.5mm? –  Paul Gaborit Sep 22 '12 at 16:08
    
@PaulGaborit Just a quick guess. –  percusse Sep 22 '12 at 16:46
    
Thanks for the help @percusse, but it not really working for me. When I tested it I got superimposition of images in. Then I tried to check the trimming by trial and error using just one image: begin{frame} \frametitle{Cufflinks analysis - SRSF1} \centering \begin{tabular}{c@{}c} \includegraphics[scale = 0.48,trim=0 0 250 0,clip]{Image1.pdf} \end{tabular} \end{frame} . IN this case besides being clipped the image is also (bizarrely) relocated to the vertical centre. –  fridaymeetssunday Sep 23 '12 at 15:10
    
@krespim trim entries goes like left bottom right top. Right now you are only trimming the right side with 0 0 250 0. Can you upload you image to the question so that I can modify my answer? –  percusse Sep 23 '12 at 15:16
    
@peruse: done. I've added the link to the figure (pdf) –  fridaymeetssunday Sep 23 '12 at 15:47

You could use TikZ and put the pictures in nodes. With no inner sep or outer sep they align perfectly. If you need spacing, you can use <position>=<distance>, like above right=3mm

Code

\documentclass{beamer}
\usepackage{tikz}

\begin{document}

\begin{frame} \frametitle{Cufflinks analysis - SRSF1}
  \begin{figure}[t]
    \begin{center}
        \begin{tikzpicture}
                \node[above right,inner sep=0,outer sep=0] {\includegraphics[scale=0.7]{test}};\pause
                \node[above left,inner sep=0,outer sep=0] {\includegraphics[scale=0.65]{test}};\pause
                \node[below right,inner sep=0,outer sep=0] {\includegraphics[scale=0.75]{test}};\pause
                \node[below left=0.5cm,inner sep=0,outer sep=0] {\includegraphics[scale=0.6]{test}};
            \end{tikzpicture}
    \end{center}
  \end{figure}
\end{frame}

\end{document}

Result

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.