Graphics, Figures & TablesFigures with multiple pictures and labels

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
lukaszskowron96
Posts: 36
Joined: Tue Oct 09, 2018 1:01 pm

Figures with multiple pictures and labels

Post by lukaszskowron96 »

Hi. I want to make a figure like the one in the picture below. Can you help me with this?

Image

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

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Figures with multiple pictures and labels

Post by Stefan Kottwitz »

Hi,

I would use the subcaption package, another way would be using subfigure. Check these links, let me know how far you get with your code and the package.

Stefan
LaTeX.org admin
lukaszskowron96
Posts: 36
Joined: Tue Oct 09, 2018 1:01 pm

Figures with multiple pictures and labels

Post by lukaszskowron96 »

Hi Stefan,

I downloaded the first package and have some problems with it...

I copied the long code from page 4 of the PDF and when typesetting it says there is a problem with a line where

Code: Select all

\subcaption{A subfigure}\label{fig:1a}
is.

I see no reason why it might a problem, please can help me with it?
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Figures with multiple pictures and labels

Post by Stefan Kottwitz »

What does it say - what is the error message?

Stefan
LaTeX.org admin
lukaszskowron96
Posts: 36
Joined: Tue Oct 09, 2018 1:01 pm

Figures with multiple pictures and labels

Post by lukaszskowron96 »

Don't worry, I sorted this out! It was a problem with <options>, I didn't specify them. If I have some more problems, I will post here.

The error message was just a "?".
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Figures with multiple pictures and labels

Post by Stefan Kottwitz »

Ok :-) error messages often go over several lines - perhaps the editor didn't show everything.

Stefan
LaTeX.org admin
lukaszskowron96
Posts: 36
Joined: Tue Oct 09, 2018 1:01 pm

Figures with multiple pictures and labels

Post by lukaszskowron96 »

I found this:

http://mirror.ox.ac.uk/sites/ctan.org/m ... on-eng.pdf

caption package PDF to find some options I could use in subcaption. But I don't know what option margin=10pt does on page 4 of this document. I kept changing it up to 100pt, it just shifted the images with respect to each other a little bit, but I still don't know what it does.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Figures with multiple pictures and labels

Post by Stefan Kottwitz »

The margin option is described on page 11, in the section 2.4 Margins and further paragraph options.

For subcaptions, it's like \captionsetup[sub]{margin=10pt}. It depends on what you intend and how. Perhaps post your document code, and what you would like to do.

Stefan
LaTeX.org admin
Post Reply