I was trying to position images as shown in the figure in LaTeX, need help.

- 48,848
- 175
-
1Related: https://tex.stackexchange.com/q/452773/47927 and https://tex.stackexchange.com/q/91348/47927. Also, this might be interesting: https://tex.stackexchange.com/q/407619/47927 – Jasper Habicht Aug 05 '21 at 11:49
1 Answers
You can make use of the subcaption package and arrange the images using a tabluar. The following may be a starting point. It is not exactly semantically correct though, because from your example it seems that both, Image and Residual, should belong to the same subfigure.
\documentclass{article}
\usepackage{graphicx}
\usepackage{subcaption}
\newlength{\subfigwidth}
\setlength{\subfigwidth}{20mm}
\begin{document}
\begin{figure}
\caption{Image type}
\centering
\begin{tabular}{r p{\subfigwidth} p{\subfigwidth} p{\subfigwidth} p{\subfigwidth}}
Image &
\begin{subfigure}[b]{\subfigwidth}
\caption{I32}
\includegraphics[width=\subfigwidth]{example-image-a}
\end{subfigure} &
\begin{subfigure}[b]{\subfigwidth}
\caption{DIP TV}
\includegraphics[width=\subfigwidth]{example-image-a}
\end{subfigure} &
\begin{subfigure}[b]{\subfigwidth}
\caption{DIP}
\includegraphics[width=\subfigwidth]{example-image-a}
\end{subfigure} &
\begin{subfigure}[b]{\subfigwidth}
\caption{sst}
\includegraphics[width=\subfigwidth]{example-image-a}
\end{subfigure} \
Residual &
\includegraphics[width=\subfigwidth]{example-image-b} &
\includegraphics[width=\subfigwidth]{example-image-b} &
\includegraphics[width=\subfigwidth]{example-image-b} &
\includegraphics[width=\subfigwidth]{example-image-b}
\end{tabular}
\begin{tabular}{r p{\subfigwidth} p{\subfigwidth} p{\subfigwidth} p{\subfigwidth}}
Image &
\begin{subfigure}[b]{\subfigwidth}
\caption{gst}
\includegraphics[width=\subfigwidth]{example-image-c}
\end{subfigure} &
\begin{subfigure}[b]{\subfigwidth}
\caption{est}
\includegraphics[width=\subfigwidth]{example-image-c}
\end{subfigure} &
\begin{subfigure}[b]{\subfigwidth}
\caption{mst}
\includegraphics[width=\subfigwidth]{example-image-c}
\end{subfigure} &
\begin{subfigure}[b]{\subfigwidth}
\caption{est}
\includegraphics[width=\subfigwidth]{example-image-c}
\end{subfigure} \
Residual &
\includegraphics[width=\subfigwidth]{example-image-a} &
\includegraphics[width=\subfigwidth]{example-image-a} &
\includegraphics[width=\subfigwidth]{example-image-a} &
\includegraphics[width=\subfigwidth]{example-image-a}
\end{tabular}
\end{figure}
\end{document}
- 48,848
