Graphics, Figures & TablesHow to put two figures horizontally in one line?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
subjugater
Posts: 7
Joined: Sat Nov 28, 2009 8:46 pm

How to put two figures horizontally in one line?

Post by subjugater »

I want to put two figures horizontally in one line. However, I don't want to use subfigure environment, because it will label the figures like 1.1, 1.2, ...

Anybody know the way to put two figures horizontally in one line but without sub-labels?

Thank you in advance.

Recommended reading 2024:

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

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

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to put two figures horizontally in one line?

Post by localghost »

Unfortunately you don't clarify whether these two figures shall float together or be fixed in a place. The code below shows a possible solution with a float environment.

Code: Select all

\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{babel}
\usepackage[font=small,labelfont=bf,tableposition=top]{caption}

\begin{document}
  \begin{figure}[!ht]
    \begin{minipage}{0.45\linewidth}
      \rule{\linewidth}{0.75\linewidth}
      \caption{Dummy}\label{fig:dummy-1}
    \end{minipage}
    \hfill
    \begin{minipage}{0.45\linewidth}
      \rule{\linewidth}{0.75\linewidth}
      \caption{Dummy}\label{fig:dummy-2}
    \end{minipage}
  \end{figure}
\end{document}

Best regards
Thorsten¹
Post Reply