4

How can I vertically center the taller figure on the right? I tried reading subfig package and there mentioned \savebox but I'm not sure if that can provide a solution. Please help. Thanks.

enter image description here

\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{array,booktabs}
\usepackage[version=4]{mhchem}
\usepackage[margin=0pt]{subfig}
\usepackage{caption}

\begin{document}
\begin{figure}
\begin{minipage}[c][11cm][t]{.5\textwidth}
\vspace*{\fill}
\centering
\subfloat[a]{\includegraphics[width=5cm]{./graphics/plots/ST034-1-4SG.pdf}
}
\par\vfill
\subfloat[b]{\includegraphics[width=5cm]{./graphics/plots/ST034all.pdf}
}
\end{minipage}
\begin{minipage}[c][11cm][t]{.5\textwidth}
\vspace*{\fill}
\centering
\subfloat[c]{\includegraphics[width=5cm]{./graphics/plots/ST034-SEC.pdf}
}
\end{minipage}%
\end{figure}
\end{document}
4

Your two minipages with little modifications can do the job (I additionally suppressed some spurious blank spaces)

\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[demo]{graphicx}
\usepackage{array,booktabs}
\usepackage[version=4]{mhchem}
\usepackage[margin=0pt]{subfig}
\usepackage{caption}

\begin{document}
\begin{figure}
\begin{minipage}[c]{.5\textwidth}
\centering
\subfloat[a]{\includegraphics[width=5cm]{./graphics/plots/ST034-1-4SG.pdf}}\par
\subfloat[b]{\includegraphics[width=5cm]{./graphics/plots/ST034all.pdf}}
\end{minipage}%
\begin{minipage}[c]{.5\textwidth}
\centering
\subfloat[c]{\includegraphics[width=5cm]{./graphics/plots/ST034-SEC.pdf}}
\end{minipage}
\end{figure}

\end{document}

enter image description here

The demo option for graphicx simply replaces actual figures with black rectangles; do not use that option in your actual document.

  • Hi Gonzalo, thanks for your quick reply. Is there anyway to decrease the amount of vertical space between the two smaller figures (a and b)? I would like to save space for text underneath. Thanks. – Spencer Trinh Sep 14 '15 at 15:49
  • @SpencerTrinh Please see my updated answer. – Gonzalo Medina Sep 14 '15 at 15:53
2

You can better control the horizontal spacing by using tabular, exploiting the fact that by default it does vertical centering of the material with respect to the current line of text; instead of \qquad you can use any \hspace you want.

For adding space between the two images on the left, you can use

\addlinespace[2cm]

or whatever length, between the two rows (after \\, to be explicit).

\documentclass{report}
\usepackage[utf8]{inputenc}
\usepackage[demo]{graphicx}
\usepackage{array,booktabs}
\usepackage[version=4]{mhchem}
\usepackage[margin=0pt]{subfig}
\usepackage{caption}

\begin{document}

\begin{figure}

\centering

\begin{tabular}{@{}c@{}}
  \subfloat[a]{\includegraphics[width=5cm]{./graphics/plots/ST034-1-4SG.pdf}}\\
  \subfloat[b]{\includegraphics[width=5cm]{./graphics/plots/ST034all.pdf}}
\end{tabular}\qquad
\begin{tabular}{@{}c@{}}
\subfloat[c]{\includegraphics[width=5cm]{./graphics/plots/ST034-SEC.pdf}}
\end{tabular}

\end{figure}

\end{document}

The demo option is just for getting an output without your images.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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