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 am trying to create a figure with subfigures aligned both horizontally and vertically in the same figure to explain this better i attached a primitive drawing.

desired image layout

The labels are not of importance in which order they come i just cant seem to figure out how to place the (f) and (g) images on top of (d) and (e) in the same

\begin{figure}

...

\end{figure}

share|improve this question

migrated from stackoverflow.com Nov 6 '12 at 19:12

This question came from our site for professional and enthusiast programmers.

    
Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. –  Werner Nov 6 '12 at 19:14
1  
Related/duplicate: Special arrangement of subfigures; Placing Subfigures vertically –  Werner Nov 6 '12 at 19:34

1 Answer 1

up vote 2 down vote accepted

One way to do this is to box each column up in a minipage, and provide a minipage for each subimage in the last column. You can then include the \subcaption inside each of the minipages. Here is an example following your layout, but just using text instead of the images:

\documentclass{article}
\usepackage{subcaption}
\begin{document}
\begin{figure}[htp]
  \centering
  \begin{minipage}[t]{0.15\linewidth}
    \centering \large A

    \vspace{2cm}

    \large AA
    \subcaption{Subfigure A}
  \end{minipage}
  \begin{minipage}[t]{0.15\linewidth}
    \centering \large B

    \vspace{2cm}

    \large BB
    \subcaption{Subfigure B}
  \end{minipage}
  \begin{minipage}[t]{0.15\linewidth}
    \centering \large C

    \vspace{2cm}

    \large CC
    \subcaption{Subfigure C}
  \end{minipage}
  \begin{minipage}[t]{0.15\linewidth}
    \centering
    \begin{minipage}[t]{0.5\linewidth}
      \centering F
     \subcaption{Subfigure F}
    \end{minipage}
    \begin{minipage}[b]{0.5\linewidth}
      \centering D \subcaption{Subfigure D}
    \end{minipage}
  \end{minipage}
  \begin{minipage}[t]{0.15\linewidth}
    \centering
    \begin{minipage}[t]{0.5\linewidth}
      \centering G
     \subcaption{Subfigure G}
    \end{minipage}
    \begin{minipage}[b]{0.5\linewidth}
      \centering E \subcaption{Subfigure E}
    \end{minipage}
  \end{minipage}
  \caption{Whole figure caption}
  \label{fig:cap}
\end{figure}
\end{document}

Sample output

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.