Figures and Images

How to Control Figure Placement in LaTeX with [h], [t] and [H]

Control figure placement in LaTeX with the [h], [t], [b], [p] and [H] specifiers, the float package, placeins and clearpage to keep floats where you want.

On this page
  1. Why figures move
  2. The placement specifiers
  3. The default order and why [htbp] helps
  4. Pin a figure with [H] and the float package
  5. Keep floats within a section with placeins
  6. Use clearpage and suppressfloats
  7. Fix “Too many unprocessed floats”
  8. Two-column documents and figure*
  9. Refer to figures in text instead of “below”
  10. Summary

LaTeX places a figure where it fits, which isn’t always where you wrote it. You control this with the optional argument after \begin{figure}, such as [htbp]. The letters tell LaTeX which positions it may use. To keep a figure exactly where you wrote it, use [H] with the float package.

Why figures move

A figure is a float. LaTeX moves it so the page layout works. If there isn’t room where you wrote the figure, LaTeX holds it and places it at a later point that suits the page. LaTeX also tends to keep floats in the order you wrote them, so one large figure waiting for space can delay the ones after it.

This is why a figure written in the middle of a section can appear at the top of the next page, or several pages later.

The placement specifiers

Letter Meaning
h Here, at the point where the figure is written, if it fits
t At the top of a page
b At the bottom of a page
p On a separate page made only of floats
! Relaxes some of LaTeX’s limits on floats, so it tries harder
H Exactly here. Needs the float package, and the figure doesn’t float

The h option is a request, not a guarantee. If the figure doesn’t fit at that point, LaTeX moves it.

The default order and why [htbp] helps

If you give no specifier, a figure uses [tbp]. Adding h at the front tells LaTeX to try the figure’s current position first:

\begin{figure}[htbp]
  \centering
  \includegraphics[width=0.6\linewidth]{chart}
  \caption{Monthly sales, 2025.}
  \label{fig:sales}
\end{figure}

With [htbp], LaTeX tries here first, then the top, the bottom and a float page. Add ! as in [!htbp] if LaTeX still refuses a position you want.

Pin a figure with [H] and the float package

For a figure that must appear exactly at a point in the text, load the float package and use H:

\usepackage{float}
...
\begin{figure}[H]
  \centering
  \includegraphics[width=0.6\linewidth]{chart}
  \caption{Monthly sales, 2025.}
  \label{fig:sales}
\end{figure}

H stops the figure from floating. The trade-off is that it may leave a gap of white space at the bottom of a page if the figure doesn’t fit there. Use H for a figure that really must sit at one point, and leave most figures floating.

If the figure has several images, put them in subfigures so they stay under one caption.

Keep floats within a section with placeins

The placeins package stops floats from drifting across section boundaries. With the section option, it inserts a barrier at each \section:

\usepackage[section]{placeins}

You can also place \FloatBarrier anywhere in the text. Floats that are waiting are placed before the barrier, so they can’t move past it.

Use clearpage and suppressfloats

\clearpage ends the current page and places all waiting floats. It’s useful at a natural break, such as before a new chapter, but it can leave white space.

\suppressfloats[t] stops floats from being placed at the top of the current page. Use [b] to stop floats at the bottom. This is handy when a figure would otherwise jump into the middle of a passage you want to keep together.

Fix “Too many unprocessed floats”

The error ! Too many unprocessed floats. means more floats are waiting than LaTeX can hold. Two fixes usually work:

  • Add \clearpage or \FloatBarrier before the point where the floats build up.
  • Move some figures closer to the text that refers to them, so they don’t pile up.

Reducing the number of large figures in a row often solves it.

Two-column documents and figure*

In a two-column layout, such as an IEEE conference paper, a figure takes one column. A figure* spans both columns. In standard LaTeX, figure* doesn’t accept h, so the usual choices are [t] or [p]:

\begin{figure*}[t]
  \centering
  \includegraphics[width=\textwidth]{wide-chart}
  \caption{A chart spanning both columns.}
  \label{fig:wide}
\end{figure*}

Refer to figures in text instead of “below”

A floating figure may end up above or below the text, or on another page. Writing “the figure below” can be wrong by the time the document compiles. Use a label and a reference instead:

Sales rose in the second half of the year, as Figure~\ref{fig:sales} shows.

This stays correct wherever LaTeX places the figure. If you want text to run beside a picture instead of placing it as a float, see how to wrap text around an image.

Summary

Start with [htbp]. Use ! if LaTeX resists a position, [H] with the float package if a figure must stay put, and placeins or \clearpage to keep floats in their section. For the basics of including an image in the first place, see the guide to inserting images in LaTeX.

The complete guide to figures and images

Inserting Images in LaTeX: PDF, PNG and More
Read the guide

Keep exploring

Guides from other topics

All topics →