# Inserted figure is appearing later than it should in when compiled to pdf [duplicate]

I have two sections in my document: sectionA and sectionB. The code for the document is something like this:

\begin{document}
\section{sectionA}

some text

\begin{figure}
\centering
\includegraphics[scale=0.3]{pic.ps}
\caption{caption}
\end{figure}

some more text

\section{sectionB}

even more text

\end{document}

However, sectionB is showing BEFORE the figure is displayed. In practice sectionA contains more text and is almost a full page, so I'm guessing LaTeX is placing the figure on the other page, seeing some empty space after sectionA and placing sectionB there.

How can I fix this? I would rather have B start after my figure, regardless of its size.

-