# How to place the figures in LaTeX document?

Although I am putting the figures after some subsection, they do not appear in which I am putting in them.

-
Check the answers to this question: Keeping tables/figures close to where they are mentioned. If that solves your problem, we'll close this as a duplicate. –  Alan Munn May 27 '11 at 17:30
Have a look at this question. (That one is about tables, but the answers also apply for figures and custom-made floats.) –  lockstep May 27 '11 at 17:30
I used \begin{figure}[!htbp] but nothing happened. –  Hephaestus May 27 '11 at 18:28
well something must have happened. What do you mean then by "don't appear"? Are they in the wrong place, or are they not there at all? Do you get an error? Do the captions show up, but not the figures? Do no figures show up, or just certain ones? You should edit your question to make this clearer. –  Alan Munn May 27 '11 at 19:38

Alan Munn posted a link to Keeping tables/figures close to where they are mentioned. Here's some code showing a way mentioned there, using the placeins package:

\usepackage{placeins}
...
\FloatBarrier
\subsection{A subsection}
...
\begin{figure}[ht]

The \FloatBarrier command prevents floating of the figure into another subsection.