Graphics, Figures & TablesLatex Figure Problem

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
sercandemir
Posts: 3
Joined: Mon Jan 19, 2015 6:52 pm

Latex Figure Problem

Post by sercandemir »

Hello. I am putting two figures using the code below

Code: Select all

\begin{figure}[h]
  \centering
  \includegraphics[width=150mm]{t1&t4}
 \vspace*{-0.8 in} \caption {Comparison of the Profit Function between Case B and Case C.3}
\end{figure}
I want to write some comments between them but in the pdf file my comments are not between 2 figures.
Also, When I add a third figure, it goes to other page. It is frustrating.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Latex Figure Problem

Post by Johannes_B »

It should not be frustrating, as we already explained what floating environments do.

The simplest cause might be, that there is simply not enough space left on the page.
If you really want to stick everything together, use something like:

Code: Select all

\documentclass{article}
\usepackage{mwe}
\begin{document}
\blindtext
\begin{figure}
\includegraphics[height=0.3\textheight]{example-image-a}
\caption{This is you caption, it is nice.}
\blindtext\par
\includegraphics[height=0.3\textheight]{example-image-b}
\caption{this is another figure. It is almost as nice as the first.}
\includegraphics[height=0.3\textheight]{example-image-c}
\caption{This is the last figure, ugly as hell.}
\end{figure}
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply