Zeyad Khattab
Zeyad Khattab

Reputation: 121

How to arrange images into grid with labels on the side in Latex

I want to display 9 images in a 3 x 3 grid in latex with labels on the side of each row like this.

Grid of images

Upvotes: 11

Views: 18584

Answers (1)

A simple tabular will do the job:

\documentclass{article}
\usepackage{graphicx}
\usepackage[export]{adjustbox}

\usepackage{duckuments} % just for the example image

\begin{document}

\begin{tabular}{llll}
Label 1 & \includegraphics[width=.2\linewidth,valign=m]{example-image-duck} & \includegraphics[width=.2\linewidth,valign=m]{example-image-duck} & \includegraphics[width=.2\linewidth,valign=m]{example-image-duck}\\
Label 2 & \includegraphics[width=.2\linewidth,valign=m]{example-image-duck} & \includegraphics[width=.2\linewidth,valign=m]{example-image-duck} & \includegraphics[width=.2\linewidth,valign=m]{example-image-duck}\\
Label 3 & \includegraphics[width=.2\linewidth,valign=m]{example-image-duck} & \includegraphics[width=.2\linewidth,valign=m]{example-image-duck} & \includegraphics[width=.2\linewidth,valign=m]{example-image-duck}\\
\end{tabular}

\end{document}

enter image description here

Upvotes: 16

Related Questions