# Adding image file in Latex

I'm trying to add a image file in the middle of report but it always go in the next page.

\begin{figure}[h]
\centering
\includegraphics[angle=45,width=62mm]{images/X}
\caption{Diagram}
\label{fig:physical}
\end{figure}


Any suggestion? Thanks.

• Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Werner May 17 '13 at 21:17

% --------------------Figure-------------
\begin{figure}[h!t] % This is the best
\centering
\includegraphics[scale=0.60]{inc/aalogo}
\caption{Diagram}
\label{fig:X}
\end{figure}

• Welcome to TeX.sx! Your post was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Werner May 17 '13 at 21:23

Not sure if this will solve your problem, but when having problems with figure placements (often relating to all figures being sparsely dumped into one column) I've played with these settings in the preample. Even though my problem was sort of the opposite from yours they might help. These will modify the float defaults, and allow for tighter text-float layout (to use together with e.g. [htpb]):

\renewcommand{\topfraction}{0.85} % maximum fraction of floats at top of page
\renewcommand{\bottomfraction}{0.8} % maximum fraction of floats at bottom of page
\renewcommand{\textfraction}{0.05} % allow small amount of text with floats
\renewcommand{\floatpagefraction}{0.82} % will make float pages tighter


Another option is the float package, but I haven't used this much myself:

\usepackage{float}
...
\begin{figure}[H]


Adding \newpage or \clearpage (also flushes floats) where they are suitable can also help LaTeX with calculating the overall layout.