# how to compose many pictures tightly in LaTex as follow

I want to compose some pictures as the example picture. All small pictures need to be ranked alignedly, and the subcaption of each row should be near to the pictures.

• Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – jub0bs Jun 23 '14 at 11:59
• See tex.stackexchange.com/questions/150367/… although in your case you would want to use (x,y) coordinates instead of edge alignment. – John Kormylo Jun 23 '14 at 14:07
• Try the subcaption package, make an attempt and see if it works. If it doesn't, please feel free to ask any question to the community here :) ---don't forget to include the code! – Mario S. E. Jun 23 '14 at 14:27
• So is the problem placing the little pictures in front of the big ones, packing the big ones tightly, creating the color legend, or just writing captions and subcaptions? – John Kormylo Jun 25 '14 at 3:22

You can use the subcaption package for this. It allows you to define some subfigures inside a figure environment. You can use it like this :

\documentclass{article}

\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}

\begin{document}

\begin{figure}
\centering
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[width=\textwidth]{picture_01}
\caption{My first picture}
\label{fig:pic01}
\end{subfigure}%
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[width=\textwidth]{picture_02}
\caption{My second picture}
\label{fig:pic02}
\end{subfigure}
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[width=\textwidth]{picture_03}
\caption{My third picture}
\label{fig:pic03}
\end{subfigure}
\caption{All of my pictures}
\label{fig:pic_all}
\end{figure}

\end{document}