I've been trying to input a graph into my .tex
file, but it won't work. I've put the .png
file in the same folder as the .tex
file and a part of my code looks like:
\documentclass[16pt, a4paper]{article}
\begin{document}
.
.
.
\usepackage{graphicx}
\begin{figure}
\includegraphics{Gaussfit.png}
\end{figure}
\end{document}
The error message I'm getting is:
! LaTeX Error: Can be used only in preamble.
How can I fix this problem ?
\begin{document}
so just move that line.\usepackage{graphicx}
in the preamble, which is between the\documentclass
and\begin{document}
.