# Images do not appear in PDF where they appear in my code

I've been having trouble getting images to appear in the PDF where they appear in my code. An example of my code is shown below.

We then plotted $\delta_1$ vs. R and got approximately a straight line.
\begin{center}
\begin{figure}
\label{Part B}
\includegraphics[scale=0.5]{LogDecGraph}
\caption{$\delta_1$ vs. R}
\end{figure}
\end{center}
From Figure 4, we can see that the zero intercept is 0.79773 $\pm$ 0.04161 which is our circuit's effective additional resistance. As stated before, a large source of error was the weak precision of Data Reader because it rounded the amplitudes to one decimal place.


I want the image (LogDecGraph) to appear between the two paragraphs and it does not, instead appearing on the next page and takes up the entire page. Any advice offered is appreciated. I've looked at similar topics but none seem to be solving my issue.

• Welcome to TeX.SX! It is always most helpful if you can provide a complete minimal working example (MWE). However, that being said, I think your question is already covered pretty thoroughly here: tex.stackexchange.com/questions/39017/… Take a look, and if it doesn't answer your question, then please provide a complete MWE. Feb 13 '15 at 4:16
• this has definitely been covered before; see the question linked by @AdamLiter. the concept of a float is basic to latex, so maybe a look at basic documentation is in order; some good resources are mentioned here: What are good learning resources for a LaTeX beginner? Feb 13 '15 at 16:33

If you really don't want a graph and its associated caption to float (in the LaTeX sense of the word), don't use a floating environment (such as figure). Instead, (i) load the caption package, (ii) omit the statements \begin{figure} and \end{figure}, and (iii) write \captionof{figure}{...} (instead of \caption{...}).

To summarize:

% in preamble:
\usepackage{caption} % for \captionof macro

% in body of text:
...
\begin{center}
\includegraphics[scale=0.5]{LogDecGraph}
\captionof{figure}{$\delta_1$ vs.\ R} \label{Part B}  % "\label" must come after "\captionof"
\end{center}

...


Immediately after \begin{figure} try putting [!htb]

• Why the t and b parts in [!htb] ?
– Mico
Feb 13 '15 at 4:07
• tex.stackexchange.com/a/8653/72139
– DrDe
Feb 13 '15 at 4:10
• This link belongs in the body of the answer, not inside a follow-up comment. You should address what the purpose of t and b is, given that the OP has asked about placing the figure between two paragraphs.
– Mico
Feb 13 '15 at 4:20