2

-Why is this not centered horizontally including the subfigures?

-What is the way to make full use of the textwidth?

A value of 0.25 leads to a 3x5 grid.

\documentclass[14pt, a4paper]{extreport}
\usepackage[left=3.5cm, right=2.5cm, top=3cm, bottom=3cm]{geometry}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{caption}
\usepackage{subcaption}
\begin{document}
\begin{figure}[htbp]
\centering
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}

\caption{Classification results of different MFCC extractions}
\label{fig:7.1}
\end{figure}
\end{document}
0

2 Answers 2

2

enter image description here

i would organize figures as follows:

\documentclass[14pt, a4paper]{book}%{extreport}
\usepackage[showframe,
            left=3.5cm, right=2.5cm, top=3cm, bottom=3cm]{geometry}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}

\begin{document}
    \begin{figure}
\centering
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-b}
\end{subfigure}\hfil
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-b}
\end{subfigure}\hfil
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-b}
\end{subfigure}\hfil
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-b}
\end{subfigure}

\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-b}
\end{subfigure}\hfil
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-b}
\end{subfigure}\hfil
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\end{subfigure}\hfil
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-b}
\end{subfigure}

\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-c}
\end{subfigure}\hfil
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\end{subfigure}\hfil
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-b}
\end{subfigure}\hfil
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-c}
\end{subfigure}

\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-a}
\end{subfigure}\hfil
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-b}
\end{subfigure}\hfil
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image-c}
\end{subfigure}\hfil
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=\linewidth]{example-image}
\end{subfigure}
    \caption{Classification results of different MFCC extractions}
\label{fig:7.1}
    \end{figure}
\end{document}
0
2

This is the answer for your second question. Uncommented ends of lines produce additional spaces, so the total length is longer than \textwidth. Please see the following example with the value 0.25 in the first row:

\documentclass[14pt, a4paper]{extreport}
\usepackage[left=3.5cm, right=2.5cm, top=3cm, bottom=3cm]{geometry}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{caption}
\usepackage{subcaption}
\begin{document}
\begin{figure}[htbp]
\centering
\begin{subfigure}[b]{0.25\textwidth}%
\includegraphics[width=0.25\textwidth]{example-image-b}
\end{subfigure}%
\begin{subfigure}[b]{0.25\textwidth}%
\includegraphics[width=0.25\textwidth]{example-image-b}
\end{subfigure}%
\begin{subfigure}[b]{0.25\textwidth}%
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}%
\begin{subfigure}[b]{0.25\textwidth}%
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}
\begin{subfigure}[b]{0.23\textwidth}
\includegraphics[width=0.23\textwidth]{example-image-b}
\end{subfigure}

\caption{Classification results of different MFCC extractions}
\label{fig:7.1}
\end{figure}
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .