# Eps Position Problem [duplicate]

I am trying to put a graph inside my TeX file it somehow misses its original places and moves somewhere else. What can I do to fix it?

Here is my code:

\documentclass{article}

\documentclass{article}

\begin{document}
TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
\begin{figure}
\begin{center}
\includegraphics[width=300pt]{uniform.eps}
\caption{Mean Square Error calculated for different number of unlabeled $x$ values each in $300$ trials.}
\label{fig:MSE}
\end{center}
\end{figure}
TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST
\end{document}


The result is:

## marked as duplicate by Werner, mafp, Xavier, Torbjørn T., egregMay 2 '13 at 21:59

• You should use \centering in your figure environment instead of \begin{center}...\end{center} - avoids extra whitespace around your figure. Also, the figure does not look like it is taking the whole page? – ach May 2 '13 at 17:56
• @ach I forgot to correct my question after I changed the topic! I am sorry! Thanks for the centering help though! But now my problem is to put the image to the place it belongs! – Naji May 2 '13 at 18:16
• Try to use \begin{figure}[h]. – Sigur May 2 '13 at 18:17
• You should read How to influence the position of float environments like figure and table in LaTeX? and/or Keeping tables/figures close to where they are mentioned, both of which make this question a duplicate. Give some feedback once you've had a chance to look them over. – Werner May 2 '13 at 18:19
• By the way, why does this have the tikz tag? As far as I can tell, the pgfplots package is loaded but not actually used for anything. – Charles Staats May 2 '13 at 19:25

\begin{figure}[!htb]