93

I need to insert 10 figures (in two columns- side by side) in LaTeX that will have one global caption, but also I need to name each figure (1a, 1b, 1c, ... ect.). So they will look like:

 1a        1b

 1c        1d

 1e        1f

 1g        1h

 1i        1j

Figure 1: plots of....

I would really appreciate if you guys can provide any help.

dustin
  • 18,617
  • 23
  • 99
  • 204
user9292
  • 1,117

2 Answers2

130

Below is how to insert two figures. Pls adapt this as per your needs. You need subcaption package.

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure}
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=.8\linewidth]{image1}
  \caption{1a}
  \label{fig:sfig1}
\end{subfigure}%
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=.8\linewidth]{image2}
  \caption{1b}
  \label{fig:sfig2}
\end{subfigure}
\caption{plots of....}
\label{fig:fig}
\end{figure}
\end{document}

enter image description here

Refer this for information about another method http://texblog.org/2011/05/24/placing-figures-side-by-side-subfig/

This is also similar to what you are looking for - how to put subfigures in several rows

Bill
  • 1,694
  • 2
  • 14
  • 11
35

Instead of you using two environments-subfig and figure, you can just use figure and subfloat

\documentclass{article}
\usepackage{float}
\usepackage[caption = false]{subfig}
\usepackage[demo]{graphicx}
\begin{document}
\begin{figure}
\subfloat[fig 1]{\includegraphics[width = 3in]{something}} 
\subfloat[fig 2]{\includegraphics[width = 3in]{something}}\\
\subfloat[fig 3]{\includegraphics[width = 3in]{something}}
\subfloat[fig 4]{\includegraphics[width = 3in]{something}} 
\caption{Add your own figures before compiling}
\label{some example}
\end{figure}
\end{document}

After every two figures add \\ or adjust the width so that only two figures fit side by side.

==========================

Please change

\usepackage[demo]{graphicx} 

to

\usepackage[final]{graphicx}

to see your actual images (instead you will always see black boxes.

Ali Salehi
  • 103
  • 4
dustin
  • 18,617
  • 23
  • 99
  • 204
  • @texenthusiast I don't know how to create those fake black boxes so that is the best I could do. – dustin Jun 19 '13 at 04:46
  • 3
    \usepackage[demo]{graphicx} in preamble will do. Note figure-filenames don't need extensions something is fine depending on LaTeX engines executed it will detect which file extension is needed. Hope you might be aware of mwe package that specifically caters to MWE needs. – texenthusiast Jun 19 '13 at 04:49