GuidesFebruary 15, 20266 min read

Why LaTeX Puts Figures in the Wrong Place (And How to Fix It)

Frustrated by figures floating to the wrong page? Learn how LaTeX figure placement works and how to control exactly where images appear.

figuresimagesfloatsplacement

"Why does my figure always end up on the next page?!" — every LaTeX beginner on Reddit, ever. LaTeX's float algorithm is actually smart, but its defaults can be surprising. Let's decode it.

How LaTeX Float Placement Works

When you write \begin{figure}[htbp], the letters are placement specifiers:

SpecifierMeaning
hHere — approximately where it appears in source
tTop of a page
bBottom of a page
pDedicated float page
!Override internal restrictions
HExactly here (requires float package)

LaTeX tries them in order. If h doesn't work (not enough space on the current page), it moves to t, then b, then p.

The 5 Most Common Fixes

1. Use [htbp] instead of just [h]

The single most common mistake — using [h] alone gives LaTeX only one option:

% ❌ Too restrictive
\begin{figure}[h]

% ✅ Give LaTeX flexibility
\begin{figure}[htbp]

2. Force exact placement with [H]

When you absolutely need the figure right here:

\usepackage{float}
\begin{figure}[H]
    \includegraphics[width=\textwidth]{figure.pdf}
    \caption{My figure, exactly where I want it.}
\end{figure}

⚠️ Use sparingly — [H] can create large whitespace gaps.

3. Add \clearpage to flush pending floats

If figures keep stacking up, force LaTeX to place them before continuing:

\section{Results}
Some text before the figure...

\begin{figure}[htbp]
    \includegraphics{results.pdf}
    \caption{Results plot.}
\end{figure}

\clearpage  % Forces all pending floats to appear

\section{Discussion}

4. Adjust float parameters

LaTeX has internal limits on how much of a page can be floats. Relax them:

\renewcommand{\topfraction}{0.9}      % max fraction of page for top floats
\renewcommand{\bottomfraction}{0.9}   % max fraction for bottom floats
\renewcommand{\textfraction}{0.1}     % min fraction of page for text
\setcounter{topnumber}{4}             % max floats at top of page
\setcounter{bottomnumber}{4}          % max floats at bottom

5. Use placeins package for section barriers

\usepackage[section]{placeins}
% Now figures won't float past section boundaries

Side-by-Side Figures

Another common request — see our dedicated tutorial on placing two figures side by side. The subcaption package makes it easy.

Pro Tip: Reference Don't Anchor

Instead of fighting the float algorithm, embrace it. Use \ref{fig:results} to reference figures by number — readers follow the reference, not the position. This is how academic journals work.

Need help with images in general? Check our guides on inserting images, resizing images, and adding captions.

Try a LaTeX Editor Built for Researchers

AI-powered writing, smart citations, no compile timeouts. Join 5,000+ researchers using Bibby AI.

Start Writing Free
Why LaTeX Puts Figures in the Wrong Place (And How to Fix It) | Bibby AI Blog