0

I want to create a grid of figures with this layout:

(a) (b) 
          (e)
(c) (d)

Where (e) is twice as tall as the other figures, and thus takes two rows instead of 1. I have no idea on how to achieve this layout, nor whether to use a figure+subfigures or a tabular.

Jaykay
  • 3
  • 1
    Will the subfigures have individual captions (like figure 1,figure 2), subcaption or no caption at all? I'd recommend the subcaption package (probably in combination with mini pages. ) – leandriis Sep 17 '19 at 15:50
  • Related: https://tex.stackexchange.com/q/302121/134144 – leandriis Sep 17 '19 at 15:54
  • A shared single extensive caption, but (a) (b) (c) and (d) need individual captions that are just their titles. – Jaykay Sep 17 '19 at 15:55
  • (e) is a thin labeling image that just contextualizes the other ones – Jaykay Sep 17 '19 at 15:56
  • In that case I'd try with two adjacent minipages. In the first minipage place the 4 images (a) -(d) using the subfigure environment from the subcaption package. In the second minipage place the last image (e) surround both minipages with a figure environment and place your caption command therein. – leandriis Sep 17 '19 at 16:00
  • So I tried creating two minipages, both with .5\textwidth. Yet, the first one grows in size and results in a layout with the first 4 images in the first row and (e) in the second. – Jaykay Sep 17 '19 at 16:25
  • Add a % sign after the first \end{minipage} and remove any empty lunes between that % and the following \begin{minipage}. You could also use a different ratio e.g. 0.75 and 0.25 instead of 0.5 and 0.5 depending on the sizes of your images. – leandriis Sep 17 '19 at 16:35
  • Figured out, needed [b] flag on BOTH minipages to force them to stay side by side. – Jaykay Sep 17 '19 at 16:35

2 Answers2

2

As suggested, you can place two minipages side-by side and manually construct the placement of the sub-figures.

enter image description here

\documentclass{article}

\usepackage{graphicx}

\begin{document}

\begin{figure}
  \begin{minipage}{.6\linewidth}
    \makebox[.5\linewidth]{\includegraphics[width=.45\linewidth]{example-image-a}}%
    \makebox[.5\linewidth]{\includegraphics[width=.45\linewidth]{example-image-b}}

    \makebox[.5\linewidth]{\small (a)}%
    \makebox[.5\linewidth]{\small (b)}%

    \medskip

    \makebox[.5\linewidth]{\includegraphics[width=.45\linewidth]{example-image-c}}%
    \makebox[.5\linewidth]{\includegraphics[width=.45\linewidth]{example-image-a}}

    \makebox[.5\linewidth]{\small (c)}%
    \makebox[.5\linewidth]{\small (d)}%
  \end{minipage}%
  \begin{minipage}{.4\linewidth}
    \centering
    \includegraphics[width=.7\linewidth]{example-image}

    \small (e)
  \end{minipage}
  \caption{Here is the figure caption.}
\end{figure}

\end{document}

Blank lines would denote a vertical break/shift in the content. \medskip adds a little bigger separation between the row of sub-figures.

Werner
  • 603,163
  • Can I put \begin{subfigure} inside of \makebox? Need captions for (a), (b), (c) and (d). – Jaykay Sep 17 '19 at 18:44
  • @Jaliborc: If you're not going to refer to them using \ref, you can just type the caption verbatim, as in \makebox[.]{\small (a) Something}. Is that sufficient? – Werner Sep 17 '19 at 18:45
  • I have just one issue with the solution I don't how to solve: I want to remove the label (e). But, if I do so,the image becomes misaligned (further to the bottom). Is there a way to solve that? – Jaykay Sep 19 '19 at 23:32
  • @Jaliborc: Just use \small \strut, or \small \phantom{(e)}. – Werner Sep 20 '19 at 05:18
0

Similar to what I already described in the comments:

enter image description here

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

\begin{document}

\begin{figure}
  \begin{minipage}{0.7\linewidth}
    \begin{subfigure}[b]{0.5\textwidth}
      \includegraphics[width=.9\linewidth]{example-image-a}
      \caption{}
    \end{subfigure}%
     \begin{subfigure}[b]{0.5\textwidth}
      \includegraphics[width=.9\linewidth]{example-image-b}
      \caption{}
    \end{subfigure}
     \begin{subfigure}[b]{0.5\textwidth}
      \includegraphics[width=.9\linewidth]{example-image-c}
      \caption{}
    \end{subfigure}%
     \begin{subfigure}[b]{0.5\textwidth}
      \includegraphics[width=.9\linewidth]{example-image}
      \caption{}
    \end{subfigure}
  \end{minipage}%
  \begin{minipage}{0.3\linewidth}
    \includegraphics[width=0.9\linewidth]{example-image-9x16}
  \end{minipage}
  \caption{Here is the figure caption.}
\end{figure}

\end{document}
leandriis
  • 62,593