Documentation/Tables & Figures/How to Create Subfigures (a), (b), (c) in LaTeX
Tables & Figures

How to Create Subfigures (a), (b), (c) in LaTeX

Many papers need to present multiple related images within a single figure, labeled (a), (b), (c), etc. The subcaption package (preferred over the older subfig or subfigure packages) makes this clean and simple. Each subfigure gets its own caption and label while sharing one main figure number. Bibby AI's templates include subcaption by default, so you can start adding subfigures immediately.

Create Two Side-by-Side Subfigures

Place two subfigure environments inside a figure, each set to slightly less than 0.5\textwidth to leave room for spacing:

\usepackage{graphicx}
\usepackage{subcaption}

\begin{figure}[htbp]
\centering
\begin{subfigure}[b]{0.48\textwidth}
    \centering
    \includegraphics[width=\textwidth]{images/method-a.png}
    \caption{Results with Method A}
    \label{fig:method-a}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.48\textwidth}
    \centering
    \includegraphics[width=\textwidth]{images/method-b.png}
    \caption{Results with Method B}
    \label{fig:method-b}
\end{subfigure}
\caption{Comparison of Method A and Method B on the test dataset.}
\label{fig:comparison}
\end{figure}

% Reference them in text:
As shown in Figure~\ref{fig:comparison}, Method B (Figure~\ref{fig:method-b})
outperforms Method A (Figure~\ref{fig:method-a}).

Create a 2x2 Grid of Subfigures

Arrange four subfigures in a grid by controlling the width and adding line breaks between rows:

\begin{figure}[htbp]
\centering
\begin{subfigure}[b]{0.45\textwidth}
    \centering
    \includegraphics[width=\textwidth]{img/epoch-10.png}
    \caption{After 10 epochs}
    \label{fig:e10}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.45\textwidth}
    \centering
    \includegraphics[width=\textwidth]{img/epoch-50.png}
    \caption{After 50 epochs}
    \label{fig:e50}
\end{subfigure}

\vspace{1em}  % Vertical space between rows

\begin{subfigure}[b]{0.45\textwidth}
    \centering
    \includegraphics[width=\textwidth]{img/epoch-100.png}
    \caption{After 100 epochs}
    \label{fig:e100}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.45\textwidth}
    \centering
    \includegraphics[width=\textwidth]{img/epoch-200.png}
    \caption{After 200 epochs}
    \label{fig:e200}
\end{subfigure}
\caption{Training progression: generated images at different training stages.}
\label{fig:training-progress}
\end{figure}

Three Subfigures in a Row

For three images across, use approximately 0.3\textwidth per subfigure. Adjust the width to leave proper margins:

\begin{figure}[htbp]
\centering
\begin{subfigure}[b]{0.3\textwidth}
    \centering
    \includegraphics[width=\textwidth]{img/input.png}
    \caption{Input image}
    \label{fig:input}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
    \centering
    \includegraphics[width=\textwidth]{img/processed.png}
    \caption{After processing}
    \label{fig:processed}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.3\textwidth}
    \centering
    \includegraphics[width=\textwidth]{img/output.png}
    \caption{Final output}
    \label{fig:output}
\end{subfigure}
\caption{Image processing pipeline: (a) raw input, (b) intermediate result, (c) final output.}
\label{fig:pipeline}
\end{figure}

💡 Tips

  • Use \hfill between subfigures to distribute horizontal space evenly — avoid hardcoded \hspace values.
  • Ensure subfigure widths sum to less than \textwidth (e.g., 2 × 0.48 = 0.96) to prevent wrapping to the next line.
  • Do not use the deprecated subfigure or subfig packages — subcaption is actively maintained and compatible with hyperref.
  • Watch for invisible whitespace: a blank line between subfigure environments can cause unwanted vertical spacing.

Try This in Bibby AI

Write LaTeX faster with AI auto-complete and instant compilation.

Start Writing Free

Related Tutorials

How to Create Subfigures (a), (b), (c) in LaTeX | Bibby AI