3

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.

6

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}

... 
|improve this answer|||||
1

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

|improve this answer|||||
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.