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.
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.
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.

\documentclass{article}
\usepackage{subcaption} % provides 'subfigure' environment
\usepackage[margin=1in]{geometry} % set margins as required
\usepackage[demo]{graphicx} % omit 'demo' option in real doc
\begin{document}
\begin{figure}
\begin{subfigure}{0.3\textwidth}
\includegraphics{figa}
\caption{First subfigure} \label{fig:1a}
\par\medskip % if more vertical separation needed, use \bigskip
\includegraphics{figb}
\caption{Second subfigure} \label{fig:1b}
\end{subfigure}
\hspace*{\fill}
\begin{subfigure}{0.3\textwidth}
\includegraphics{figc}
\caption{Third subfigure} \label{fig:1c}
\par\medskip % if more vertical separation needed, use \bigskip
\includegraphics{figd}
\caption{Fourth subfigure} \label{fig:1d}
\end{subfigure}
\hspace*{\fill}
\begin{subfigure}{0.3\textwidth}
\includegraphics{fige}
\caption{Fifth subfigure} \label{fig:1e}
\par\medskip % if more vertical separation needed, use \bigskip
\includegraphics{figf}
\caption{Sixth subfigure} \label{fig:1f}
\end{subfigure}
\caption{This is a figure with six subfigures}\label{fig:1}
\end{figure}
\end{document}
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.
–
Jun 20 '13 at 18:08
One option is to manually control the counter:
\documentclass{article}
\usepackage{graphicx}
\usepackage{floatrow}
\usepackage{subfig}
\floatsetup[figure]{style=plain,subcapbesideposition=top}
\begin{document}
\begin{figure}
\ffigbox
{\begin{subfloatrow}[3]
\sidesubfloat[]{\includegraphics[width=3cm]{example-image-a}\label{sfig:i-i}}%
\setcounter{subfigure}{2}%
\sidesubfloat[]{\includegraphics[width=3cm]{example-image-b}\label{sfig:i-ii}}%
\setcounter{subfigure}{4}%
\sidesubfloat[]{\includegraphics[width=3cm]{example-image-c}\label{sfig:i-iii}}%
\end{subfloatrow}\par\bigskip
\begin{subfloatrow}[3]
\setcounter{subfigure}{1}%
\sidesubfloat[]{\includegraphics[width=3cm]{example-image-a}\label{sfig:ii-i}}%
\setcounter{subfigure}{3}%
\sidesubfloat[]{\includegraphics[width=3cm]{example-image-b}\label{sfig:ii-ii}}%
\setcounter{subfigure}{5}%
\sidesubfloat[]{\includegraphics[width=3cm]{example-image-c}\label{sfig:ii-iii}}%
\end{subfloatrow}}
{\setcounter{figure}{1}\caption{A figure with subfigures}\label{fig:test}}
\end{figure}
\end{document}
