I am trying to center graphics in TexShop. This is the code that I am using but the graphics are not getting centering whatever I try to do.
\begin{figure}[H]
\centering
\includegraphics[height = 2.3in]{/Users/LOCATION/Matrix1.png}
\caption{Generated Matrix}
\end{figure}
The code is giving me this image
I tried using
\begin{center}
...
end{center}
instead of \centering but nothing seems to be fixing the problem.
EDIT 1 : Full Code
\documentclass[11pt]{article}
\usepackage{graphicx}
\usepackage{amsmath}
\begin{document}
\begin{figure}[H]
\centering
\caption{Generated Matrix}
\includegraphics[height = 2.3in] {/Users/Max/Desktop/Math IA/PhysicsDrawings/Matrix1.png}
\end{figure}
\end{document}

\fbox{\includegraphics ... }. Do you get a lot of white space around the image? Also (unrelated to the problem): png isn't a good format for an image that contains text.epsorpdfwould be better. – Ian Thompson Apr 24 '17 at 12:51LOCATIONa path that includes spaces? – Torbjørn T. Apr 24 '17 at 12:55\includegraphics[height = 2.3in]{Matrix1.png}should worrk. – David Carlisle Apr 24 '17 at 13:37\fboxbut that didn't seem to help. Here is more of the code including the actual location of the file...\begin{figure}[H] \centering \caption{Generated Matrix} \includegraphics[height = 2.3in] {/Users/Max/Desktop/Math IA/PhysicsDrawings/Matrix1.png} \end{figure}Is there any problems with this?
– Sumant Apr 24 '17 at 13:43\documentclass{...}, the required\usepackage's,\begin{document}, and\end{document}. That may seem tedious to you, but think of the extra work it represents for TeX.SX users willing to give you a hand. Help them help you: remove that one hurdle between you and a solution to your problem. You can replace the actual file withexample-image. – erik Apr 24 '17 at 13:44\fbox, did you see white space between the image and the frame or not? – Ian Thompson Apr 24 '17 at 13:47