Graphics, Figures & TablesCombine subfloats and categories

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
summer
Posts: 1
Joined: Fri May 01, 2015 12:07 pm

Combine subfloats and categories

Post by summer »

Hey community.

It is hard to describe what I'm looking for. This is the reason why I have made an image:

Image

Has someone an idea how to do this with LaTeX? The subfloats are no problem, but how can I create "category 1" and "category 2"?

summer

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

rais
Posts: 419
Joined: Sun Nov 16, 2014 8:51 pm

Combine subfloats and categories

Post by rais »

summer wrote: Has someone an idea how to do this with LaTeX? The subfloats are no problem, but how can I create "category 1" and "category 2"?
just write them before the subfigures, e.g.

Code: Select all

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure}
\centering
category 1\hfill\begin{subfigure}[c]{0.25\linewidth}
  \includegraphics[width=0.9\linewidth]{a1}
  \end{subfigure}%
\begin{subfigure}[c]{0.25\linewidth}
  \includegraphics[width=0.9\linewidth]{a2}
  \end{subfigure}%
\begin{subfigure}[c]{0.25\linewidth}
  \includegraphics[width=0.9\linewidth]{a3}
  \end{subfigure}\par
\medskip
\raisebox{\baselineskip}{category 2}\hfill\begin{subfigure}[c]{0.25\linewidth}
  \includegraphics[width=0.9\linewidth]{b1}
  \caption{}
  \end{subfigure}%
\begin{subfigure}[c]{0.25\linewidth}
  \includegraphics[width=0.9\linewidth]{b2}
  \caption{}
  \end{subfigure}%
\begin{subfigure}[c]{0.25\linewidth}
  \includegraphics[width=0.9\linewidth]{b3}
  \caption{}
  \end{subfigure}
\caption{categorized subfigures}
\end{figure}
\end{document}
KR
Rainer
Post Reply