Getting the graphics/pictures at the right spot [duplicate]

I have three .eps files which i saved from MATLAB.Iam writing in latex and would like to add these three pictures just below my text in the section that Iam writing in.here is the latex code Iam using:

\begin{figure}[H]
\includegraphics[height=150px,width = 200px ]{poisson1.eps}
\hfill
\includegraphics[height=150px ,width = 200px ]{poisson2.eps}
\hfill
\includegraphics[height=150px ,width = 200px ]{poisson3.eps}
\end{figure}


The first problem is that these graphics/pics. end up at the end of the document not below my text as i want. Latex just seem to put the graphics/pictures where it wants. How can i change the way latex chooses to place the graphics/pitures

Can someone help?

• @IanThompson not really, I suspect – David Carlisle Feb 1 '15 at 20:45
• Did you load the float package? – egreg Feb 1 '15 at 20:47

H is an extension from the float package. If you use [H] without loading

\usepackage{float}


then it will have the behaviour you describe of taking your float to the end as it is not allowed in any of the htbp positions so it is not allowed anywhere.

In the 2014 release, if you load

\usepackage{fixltx2e}


Then the float environments give an error for unknown options and so you would be warned.

You do not really need H. the only reason to use \begin{figure} is to allow LaTeX to move the figure to help page breaking. If you do not want it to move, just use \includegraphics directly.