0

Similar to this question, I am using subfigure to layout a grid of images. I would like (a) to be upper left, (b) to be lower left, (c) to be upper right, and (d) to be lower right. How to do this?

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{subcaption}

\begin{document}
  \begin{figure}
    \centering
    \begin{subfigure}[b]{0.3\textwidth}
      \centering
      \includegraphics[width=\textwidth]{dummy}
      % \caption*{Column 1a}
      \label{fig:1}
    \end{subfigure}%
    ~
    \begin{subfigure}[b]{0.3\textwidth}
      \centering
      \includegraphics[width=\textwidth]{dummy}
      % \caption*{Column 2a}
      \label{fig:2}
    \end{subfigure}%
    \\ % Change row.
    \begin{subfigure}[b]{0.3\textwidth}
      \centering
      \includegraphics[width=\textwidth]{dummy}
      \caption{Column 1b}
      \label{fig:3}
    \end{subfigure}%
    ~
    \begin{subfigure}[b]{0.3\textwidth}
      \centering
      \includegraphics[width=\textwidth]{dummy}
      \caption{Column 2b}
      \label{fig:4}
    \end{subfigure}%
    \caption{The overall caption.}
    \label{fig:all}
  \end{figure}%
\end{document}

2 Answers 2

2

You could use a tabular containing two tabulars.

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{subcaption}
\usepackage{array}
\begin{document}
  \begin{figure}
    \centering
    \begin{tabular}{@{}c@{}p{1ex}@{}c@{}}
        \begin{tabular}{@{}c@{}}
            \begin{subfigure}[b]{0.3\textwidth}
                \centering
                \includegraphics[width=\textwidth]{dummy}
                \caption{Column 1a}
                \label{fig:1}
            \end{subfigure}\\[1em]
            \begin{subfigure}[b]{0.3\textwidth}
                \centering
                \includegraphics[width=\textwidth]{dummy}
                \caption{Column 1b}
                \label{fig:2}
            \end{subfigure}%                    
        \end{tabular}
        &&
        \begin{tabular}{@{}c@{}}
        \begin{subfigure}[b]{0.3\textwidth}
        \centering
        \includegraphics[width=\textwidth]{dummy}
        \caption{Column 2a}
        \label{fig:3}
        \end{subfigure}\\[1em]
        \begin{subfigure}[b]{0.3\textwidth}
        \centering
        \includegraphics[width=\textwidth]{dummy}
        \caption{Column 2b}
        \label{fig:4}
        \end{subfigure}%
        \end{tabular}
    \end{tabular}
    \caption{The overall caption.}
    \label{fig:all}
  \end{figure}%
\end{document}

enter image description here

1

With use of the minipages is quite simple:

\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{array}

\begin{document}
    \begin{figure}
    \centering
\setkeys{Gin}{width=\linewidth}
    \begin{minipage}[t]{0.45\textwidth}  
        \begin{subfigure}[b]{\linewidth} 
            \includegraphics{example-image-duck}
            \caption{Column 1a}
            \label{fig:1}
        \end{subfigure}

        \medskip
        \begin{subfigure}[b]{\linewidth} 
            \includegraphics{example-image-duck}
            \caption{Column 1b}
            \label{fig:2}
        \end{subfigure}%
    \end{minipage}\hfil
    \begin{minipage}[t]{0.45\textwidth} 
        \begin{subfigure}[b]{\linewidth} 
        \includegraphics{example-image-duck}
        \caption{Column 2a}
        \label{fig:3}
        \end{subfigure}
        
        \medskip
        \begin{subfigure}[b]{\linewidth} 
        \centering
        \includegraphics{example-image-duck}
        \caption{Column 2b}
        \label{fig:4}
        \end{subfigure}%
    \end{minipage}
\caption{The overall caption.}
\label{fig:all}
    \end{figure}%
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .