Graphics, Figures & TablesImported Picture Ends up on Wrong Page

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
bpetersen
Posts: 11
Joined: Mon Sep 13, 2010 9:55 pm

Imported Picture Ends up on Wrong Page

Post by bpetersen »

In my lab the picture I have imported comes after the results on a random page. How do I make it so that the image comes right after the table of values?

I am using : Windows XP, Adobe Reader 9.3.4, MixTex 2.7, and TeXnicCenter

Code: Select all

%----------------------------------------DOCUMENT CLASS
\documentclass[11pt,a4paper]{article}

%----------------------------------------PACKAGES
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{graphics}
\usepackage{multirow}
\usepackage[usenames,dvipsnames]{color}
\usepackage{calc}

%-----------------------------------------DECLARATIONS
\definecolor{lightgray}{gray}{0.95}

%-----------------------------------------BEGIN DOCUMENT
\begin{document}
\begin{flushleft}

%------------------------------------------PURPOSE
\section{Purpose:}
This experiment's purpose is to introduce the pn Junction diode. We will observe the voltage-current relationship of the pn Junction and how temperature effects that relationship.

%-------------------------------------------EXPERIMENTAL PROCEDURES
\section{Experimental Procedures:}

%-------------------------------------------TASK1
\subsection{Task 1:}

\subsubsection{Analysis:}
Task 1 required us to design the circuit below and observe the current and voltage characteristics of the silicon diode 1N916. We changed the values for the resistor between 1M$\Omega$ , 100k$\Omega$, 10k$\Omega$ and 1k$\Omega$ and varied the voltage between 1.5, 2.3V, 3.6V and 6V.

\subsubsection{Data and Calculation:}


%------------------------------------Silicon Diode Table of Voltages and Currents
\begin{center}
\begin{tabular}{|r|c|c|c|}

\hline			
 & $V_{S}$ & $V_{D}$ & $I_{D}$\\ 						\hline

\multirow{4}{*}{1M$\Omega$} & 1.5 V & 0.287 V & 1.25 $\mu$A \\
 & 2.3 V & 0.313 V & 2.08 $\mu$A \\
 & 3.4 V & 0.337 V & 3.32 $\mu$A \\
 & 6.0 V & 0.366 V & 5.83 $\mu$A \\\hline
 										\multirow{4}{*}{100k$\Omega$} & 1.5 V & 0.405 V & 11.8 $\mu$A \\
 & 2.3 V & 0.430 V & 19.4 $\mu$A \\
 & 3.4 V & 0.455 V & 32.5 $\mu$A \\
 & 6.0 V & 0.497 V & 57.5 $\mu$A \\\hline
 										\multirow{4}{*}{10k$\Omega$} & 1.5 V & 0.525 V 	& 99.0 $\mu$A \\
 & 2.3 V & 0.554 V & 164 $\mu$A \\
 & 3.4 V & 0.571 V & 285 $\mu$A \\
 & 6.0 V & 0.605 V& 0.552 mA \\\hline
 										\multirow{4}{*}{1k$\Omega$} & 1.5 V & 0.631 V & 0.856 mA \\
 & 2.3 V & 0.664 V & 1.59 mA \\
 & 3.4 V & 0.685 V & 2.76 mA \\
 & 6.0 V & 0.717 V & 4.95 mA \\\hline
\end{tabular}
\end{center}
\[\text{Silicon Diode - 1N916}\]

\begin{figure}[h]
	\centering
		\scalebox{0.45}{\includegraphics{realSiliconDiodeLab1jpeg.jpeg}}
	\caption{Diode Voltage vs Diode Current - Silicon Diode 1N916}
\end{figure}

\subsubsection{Results:}
We notice that the Voltage Current relation for the pn Junction under forward bias resembles an exponential function.

%-------------------------------------------------------------TASK 2
\subsection{Task 2:}

\subsubsection{Analysis:}
Task 2 had us perform the same procedures done in task 1 except we replaced the silicon diode 1N916 with the Germanium diode 1N34 and we measured the reverse saturation current as well.
Attachments
LABONEHELPPP.pdf
Section of my Lab with Image Problem
(146.98 KiB) Downloaded 271 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

tikzkit
Posts: 2
Joined: Tue Sep 28, 2010 8:46 pm

Imported Picture Ends up on Wrong Page

Post by tikzkit »

you can change the positioning parameter to

Code: Select all

\begin{figure}[H]
wich places your figure at the source code position. Then you could do the same with a

Code: Select all

\begin{table}[H]
around your tabular-table. An exclamation-mark also increases the probability of the sourcecode position. However, figures are floating objects, if you want a fixed position, dont use the figure env. fyi: figure positioning values

edit:spelling
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Imported Picture Ends up on Wrong Page

Post by localghost »

Make sure that there is enough space left on the page where you want to place it. If done so, start with appropriate placement parameters for your float.

Code: Select all

\begin{figure}[!ht]
  \centering
  \includegraphics[scale=0.45]{realSiliconDiodeLab1jpeg}
  \caption{Diode Voltage vs Diode Current -- Silicon Diode 1N916}
\end{figure}

Best regards and welcome to the board
Thorsten
bpetersen
Posts: 11
Joined: Mon Sep 13, 2010 9:55 pm

Imported Picture Ends up on Wrong Page

Post by bpetersen »

@tikzkit:
changing \begin{figure}[h] ---> \begin{figure}[H] just created a new page at the end of the document and put the picture there

@localghost:
changing

Code: Select all

\begin{figure}[h]
   \centering
      \scalebox{0.45}{\includegraphics{realSiliconDiodeLab1jpeg.jpeg}}
   \caption{Diode Voltage vs Diode Current - Silicon Diode 1N916}
\end{figure}
to

Code: Select all

\begin{figure}[!ht]
  \centering
  \includegraphics[scale=0.45]{realSiliconDiodeLab1jpeg}
  \caption{Diode Voltage vs Diode Current -- Silicon Diode 1N916}
\end{figure}
resulted in Fatal Error :\
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Imported Picture Ends up on Wrong Page

Post by localghost »

My solution of course requires the graphicx package (note the »x« at the end). That's something I should have added to my reply.
Post Reply