Documentation/Tables & Figures/How to Place Two Figures Side by Side in LaTeX
Tables & Figures

How to Place Two Figures Side by Side in LaTeX

There are several ways to place figures side by side in LaTeX. The best method depends on whether you need separate captions.

Using subcaption (Recommended)

Best for figures that are related:

\usepackage{subcaption}

\begin{figure}[htbp]
\centering
\begin{subfigure}{0.48\textwidth}
  \centering
  \includegraphics[width=\linewidth]{fig1.png}
  \caption{First image}
  \label{fig:first}
\end{subfigure}
\hfill
\begin{subfigure}{0.48\textwidth}
  \centering
  \includegraphics[width=\linewidth]{fig2.png}
  \caption{Second image}
  \label{fig:second}
\end{subfigure}
\caption{Overall caption for both}
\label{fig:both}
\end{figure}

Using minipage

For independent figures:

\begin{figure}[htbp]
\centering
\begin{minipage}{0.45\textwidth}
  \centering
  \includegraphics[width=\linewidth]{img1.png}
  \caption{Left figure}
\end{minipage}
\hfill
\begin{minipage}{0.45\textwidth}
  \centering
  \includegraphics[width=\linewidth]{img2.png}
  \caption{Right figure}
\end{minipage}
\end{figure}

Three or More Figures

Extend to grids:

\begin{figure}[htbp]
\centering
\begin{subfigure}{0.32\textwidth}
  \includegraphics[width=\linewidth]{a.png}
  \caption{A}
\end{subfigure}
\begin{subfigure}{0.32\textwidth}
  \includegraphics[width=\linewidth]{b.png}
  \caption{B}
\end{subfigure}
\begin{subfigure}{0.32\textwidth}
  \includegraphics[width=\linewidth]{c.png}
  \caption{C}
\end{subfigure}
\caption{Three figures in a row}
\end{figure}

💡 Tips

  • •Use 0.48\textwidth for 2 figures to leave space for \hfill
  • •subfigure creates (a), (b) sub-labels automatically
  • •Reference individually: Figure \ref{fig:first} or together: Figure \ref{fig:both}

Try This in Bibby AI

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

Start Writing Free

Related Tutorials

How to Place Two Figures Side by Side in LaTeX | Bibby AI