[Tex/LaTex] \centering not working in latex

graphicshorizontal alignment

This is my code, but my picture is on the left!!!
Can anyone share a better code?
thanks a lot

\begin{figure}[H]
\centering
\includegraphics[width=25cm,height=25cm,keepaspectratio]{1.eps}
\caption{Aerial view}\label{fig:1}
\end{figure}

Best Answer

\centering will not centre anything that is wider than the page (as is the case with an image scaled to 25cm wide) all excess width will stick into the right margin (and TeX will issue overfill box warnings). The code shown will centre the image if it was scaled to a smaller width.