Graphics, Figures & TablesLocate a Figure in the right Place

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
Sam
Posts: 62
Joined: Fri Nov 30, 2007 1:43 pm

Locate a Figure in the right Place

Post by Sam »

Deal all,

I have a difficulty locating a figure in the right place The used syntax is this.

Code: Select all

\begin{figure}[h!]
\begin{center}
\includegraphics[height=4cm]{bifurcation.jpg}    % The printed column  
\caption{Bifurcation: Plot of local maxima of $x$ with damping $a$ decreasing}  % width is 8.4 cm.
\label{fig1}                                 % Size the figures 
\end{center}                                 % accordingly.
\end{figure}
Not quite sure what is the problem!

Help me please.

Thanks
Last edited by localghost on Sat Nov 12, 2011 8:12 pm, edited 1 time in total.

Recommended reading 2024:

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

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10321
Joined: Mon Mar 10, 2008 9:44 pm

Locate a Figure in the right Place

Post by Stefan Kottwitz »

Hi Sam,

it depends on what you mean which is the "right place". LaTeX figures are designed to float to good places, such as to to the top of a page or to the bottom or onto a separate page, also for good automatic page breaking.

If you place it yourself, it can happen that there's space left on a page but not enough for the figure. If it doesn't float within the text, it would just go to the next page (because of missing space) and a lot of white space would remain on the previous page.

Figures don't have to be at a fixed place in the document, since you can refer to them by \ref and \label. If you don't want images to float, you don't need a figure environment.

You specified the option h!. This allows positioning "here" and but not at other places, which is a restriction. You could write htbp! to allow also top and bottom of a page, and on dedicated pages.

If you really would like to prevent floating and to place the figure manually, here are solutions: Prevent floating of figures or tables.

Stefan
LaTeX.org admin
Post Reply