[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

\caption{Aerial view}\label{fig:1}

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.