As LaRiFaRi suggested \newcommand*{\arraystretch}{0}
supresses space between rows and @{}
between columns.
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\renewcommand*{\arraystretch}{0}
\begin{tabular}{*{3}{@{}c}@{}}
\includegraphics[scale=0.2]{example-image} &
\includegraphics[scale=0.2]{example-image} &
\includegraphics[scale=0.2]{example-image} \\
\includegraphics[scale=0.2]{example-image} &
\includegraphics[scale=0.2]{example-image} &
\includegraphics[scale=0.2]{example-image} \\
\includegraphics[scale=0.2]{example-image} &
\includegraphics[scale=0.2]{example-image} &
\includegraphics[scale=0.2]{example-image}
\end{tabular}
\caption{Many figures}
\end{figure}
\end{document}

2nd option: with raster
library from tcolorbox
raster
library allows you to arrange several boxes in a regular way. By default, every row occupies the whole line width and tcolorbox
calculates inner tcolorboxes size.
Instead of \includegraphics
you must use \tcbincludegraphics
because raster
environment expects tcolorboxes
. tcolorbox
options can be used: title
, colors, etc. and also special options to \includegrahics
command can be indicated with graphics={...}
. You can also decide distance between rows and columns.
The code for this particular case could be:
\documentclass{article}
\usepackage[most]{tcolorbox}
\begin{document}
\begin{figure}
\centering
\begin{tcbraster}[raster columns=3, raster equal height,
raster column skip=0pt, raster row skip=0pt, raster every box/.style={blank}]
\tcbincludegraphics{example-image}
\tcbincludegraphics{example-image}
\tcbincludegraphics{example-image}
\tcbincludegraphics{example-image}
\tcbincludegraphics{example-image}
\tcbincludegraphics{example-image}
\tcbincludegraphics{example-image}
\tcbincludegraphics{example-image}
\tcbincludegraphics{example-image}
\end{tcbraster}
\caption{Many figures}
\end{figure}
\end{document}

\begin{figure}\tabcolsep=0pt\renewcommand*{\arraystretch}{0}
article
.document class
. It didn't reduce the space, both between the rows and columns, no errors though.