I have 6 images, and I want to align them in this way

(a)image1 (c)image3 (e)image5

(b)image2 (d)image4 (f)image6

Any one know how to do that? The problem for me is how to make (a), (b),..., (f) in vertical direction.

  • 1
    Welcome to TeX.SE! Please edit your posting to provide (lots more) information about the document class you use, the width and height of the text block of your document, and any LaTeX packages you may be using that affect the appearance of figures and subfigures. – Mico Jun 20 '13 at 14:54
  • Welcome to TeX.SX! – mafp Jun 20 '13 at 14:57

If I understand your requirements correctly, you could achieve your objective by using three separate subfigure environments in the main figure environment, with each containing two vertically stacked graphs and associated captions (and, if needed, labels for cross-referencing purposes). If you want to use the example code below, be sure to (a) leave off the 'demo' option of the graphicx package and (b) specify real file names for the actual graphics rather than figa, figb, etc.

enter image description here

\usepackage{subcaption} % provides 'subfigure' environment
\usepackage[margin=1in]{geometry} % set margins as required
\usepackage[demo]{graphicx} % omit 'demo' option in real doc
  \caption{First subfigure} \label{fig:1a}
  \par\medskip % if more vertical separation needed, use \bigskip
  \caption{Second subfigure} \label{fig:1b}
  \caption{Third subfigure} \label{fig:1c}
  \par\medskip % if more vertical separation needed, use \bigskip
  \caption{Fourth subfigure} \label{fig:1d}
  \caption{Fifth subfigure} \label{fig:1e}
  \par\medskip % if more vertical separation needed, use \bigskip
  \caption{Sixth subfigure} \label{fig:1f}
\caption{This is a figure with six subfigures}\label{fig:1}
  • Ah, perhaps I misunderstood the question? With the description given I assumed labels should appear to the left of the images, but now that I see you're answer perhaps this wasn't required. – Gonzalo Medina Jun 20 '13 at 15:32
  • @GonzaloMedina - I wasn't sure either how exactly to interpret the OP's requirements; that's why I prefaced my answer with a "If I understand ..." disclaimer. :-) – Mico Jun 20 '13 at 15:41
  • The answer is good. It is easy to put the labels to the left of the image. – user32558 Jun 20 '13 at 16:54
  • 2
    Since the subfigure environment is in fact a minipage extra minipage environments are IMHO not needed. Just put two images + captions within one subfigure environment should be sufficient. – Axel Sommerfeldt Jun 20 '13 at 18:08
  • @AxelSommerfeldt - Many thanks for this excellent suggestion; I've modified the code to incorporate it. – Mico Jun 20 '13 at 18:53

One option is to manually control the counter:




{\setcounter{figure}{1}\caption{A figure with subfigures}\label{fig:test}}


enter image description here

  • Thank you very much. All the two answers are very good to solve my problem. – user32558 Jun 20 '13 at 16:06

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.