[Tex/LaTex] Arranging multiple subfigures beside and above each other

floatsgraphicspositioningsubfloats

I would like the subfigures of my figure to be arranged like so:

,---,  ,---,
|   |  '---'
|   |   (b)
|   |  ,---,
'---'  '---'
 (a)    (c)

I would like the bottom two images to be aligned vertically and the right two images to be aligned horizontally.

I've been trying combinations of subfigure and minipage, but to no avail:

\documentclass{article}
\usepackage{graphicx,caption,subcaption}

\usepackage{lipsum}


\begin{document}

\begin{figure}
        \centering
\begin{minipage}[t]{.45\columnwidth}
    \begin{subfigure}[t]{\columnwidth}
        \includegraphics[width=.9\columnwidth,height=\columnwidth]{example-image-a}
        \caption{}
    \end{subfigure}
\end{minipage}
\begin{minipage}[t]{.45\columnwidth}
    \begin{subfigure}[t]{\columnwidth}
        \centering
        \includegraphics[width=.9\columnwidth,height=.5\columnwidth]{example-image-b}
        \caption{}
    \end{subfigure}
    \begin{subfigure}[b]{\columnwidth}
        \includegraphics[width=.9\columnwidth,height=.5\columnwidth]{example-image-c}
        \caption{}
    \end{subfigure}
\end{minipage}
\end{figure}


\end{document}

Produces:

,---, 
|   | 
|   | 
|   |  ,---,
'---'  '---'
 (a)    (b)
       ,---,
       '---'
        (c)

Best Answer

Two solutions, one with a measure, the second leaving the task to TeX.

\documentclass[twocolumn]{article}
\usepackage{graphicx,caption,subcaption}

\usepackage{lipsum}

\newsavebox{\arrangebox}
\newlength{\arrangeht}

\begin{document}

\lipsum[2]

\begin{figure}[htp]
\centering

\sbox{\arrangebox}{%
  \begin{subfigure}[b]{0.45\columnwidth}
  \centering
  \includegraphics[width=.9\textwidth,height=6cm]{example-image}
  \caption{}
  \end{subfigure}%
}
\setlength{\arrangeht}{\ht\arrangebox}

\usebox{\arrangebox}\hfill
\begin{minipage}[b][\arrangeht][s]{0.45\columnwidth}
  \begin{subfigure}[t]{\textwidth}
  \centering
  \includegraphics[width=.9\textwidth,height=2cm]{example-image}
  \caption{}
  \end{subfigure}\vfill
  \begin{subfigure}[b]{\textwidth}
  \centering
  \includegraphics[width=.9\textwidth,height=2cm]{example-image}
  \caption{}
  \end{subfigure}
\end{minipage}

\end{figure}

\lipsum[3]

\begin{figure}[htp]
\centering

\valign{#\cr
  \hsize=0.45\columnwidth
  \begin{subfigure}{0.45\columnwidth}
  \centering
  \includegraphics[width=.9\textwidth,height=6cm]{example-image}
  \caption{}
  \end{subfigure}\cr\noalign{\hfill}
  \hsize=0.45\columnwidth
  \begin{subfigure}{0.45\columnwidth}
  \centering
  \includegraphics[width=.9\textwidth,height=2cm]{example-image}
  \caption{}
  \end{subfigure}\vfill
  \begin{subfigure}{0.45\columnwidth}
  \centering
  \includegraphics[width=.9\textwidth,height=2cm]{example-image}
  \caption{}
  \end{subfigure}\cr
}

\end{figure}

\lipsum

\end{document}

enter image description here

The first solution consists in first measuring the height of the big figure, together with its subcaption (whence the [b] positioning).

The right half is set in a minipage whose height is prescribed to be the same as the left box:

\begin{minipage}[<outer alignment>][<height>][<inner alignment>]

The <inner alignment> here is s, meaning that only explicit skips are used for spacing items; in this case it's the \vfill between the two subfigures. The <outer alignment> is the same as the left subfigure, that is b.

The <height> is set to \ht\arrangebox, which is the height of the saved box. The box is then used for typesetting the left subfigure.

The second solution is more esoteric, as it relies on knowledge of some basic TeX constructs, in particular \valign. I'll make it into a LaTeX environment.

You pass to subcolumns the width of each column. Subfigures in the same column are separated with \nextsubfigure; with \nextsubcolumn the next column is started.

The advantage is that one can have as many columns and subfigures as one wants. For instance two in the first column and three in the second or whatever.

\documentclass[twocolumn]{article}
\usepackage{graphicx,caption,subcaption}

\usepackage{lipsum}

% for the first solution
\newsavebox{\arrangebox}
\newlength{\arrangeht}

% for the second solution
\newenvironment{subcolumns}[1]
 {\valign\bgroup\hsize=#1##\cr}
 {\crcr\egroup}
\newcommand{\nextsubcolumn}{\cr\noalign{\hfill}}
\newcommand{\nextsubfigure}{\vfill}

\begin{document}

\lipsum[2]

\begin{figure}[htp]
\centering

\sbox{\arrangebox}{%
  \begin{subfigure}[b]{0.45\columnwidth}
  \centering
  \includegraphics[width=.9\textwidth,height=6cm]{example-image}
  \caption{}
  \end{subfigure}%
}
\setlength{\arrangeht}{\ht\arrangebox}

\usebox{\arrangebox}\hfill
\begin{minipage}[b][\arrangeht][s]{0.45\columnwidth}
  \begin{subfigure}[t]{\textwidth}
  \centering
  \includegraphics[width=.9\textwidth,height=2cm]{example-image}
  \caption{}
  \end{subfigure}\vfil
  \begin{subfigure}[b]{\textwidth}
  \centering
  \includegraphics[width=.9\textwidth,height=2cm]{example-image}
  \caption{}
  \end{subfigure}
\end{minipage}

\end{figure}

\lipsum[3]

\begin{figure}[htp]
\centering

\begin{subcolumns}{0.45\columnwidth}
  \begin{subfigure}{0.45\columnwidth}
  \centering
  \includegraphics[width=.9\textwidth,height=6cm]{example-image}
  \caption{}
  \end{subfigure}
\nextsubcolumn
  \begin{subfigure}{0.45\columnwidth}
  \centering
  \includegraphics[width=.9\textwidth,height=2cm]{example-image}
  \caption{}
  \end{subfigure}
\nextsubfigure
  \begin{subfigure}{0.45\columnwidth}
  \centering
  \includegraphics[width=.9\textwidth,height=2cm]{example-image}
  \caption{}
  \end{subfigure}
\end{subcolumns}

\end{figure}

\lipsum

\end{document}