I am currently studying the answers to this question about subfigures for use in my writing. The results are impressive especially for the last answer posted for the question. However, I didn't find how the number of rows and columns of the graphs i.e subfigures can be specified. I have tried using "subfig" in the last answer. This works fine. Besides, it automatically arranges the sub-figures. However, when I try to increase the size of the sub-figures, it exceeds the bounds of the page. I hope someone could share how the number of rows and columns for the graphs to be specified, or how the whole figure (including all sub-figures) can be scaled. I didn't repeat the code to avoid monotony and redundancy.
Edit: I include a MWE
\documentclass[a4paper,12pt]{article}
\usepackage{graphicx}
\usepackage{subcaption}
\begin{document}
\begin{figure}[htb]
\centering
\subfloat[A subfigure]{%
\includegraphics[width=.24\textwidth]{somefig_1}}
\subfloat[A subfigure]{%
\includegraphics[width=.24\textwidth]{somefig_2}}
\subfloat[A subfigure]{%
\includegraphics[width=.24\textwidth]{somefig_3}}
\subfloat[A subfigure]{%
\includegraphics[width=.24\textwidth]{somefig_4}}
\caption{Arranged sub-figures}\label{fig:1}
\end{figure}
\end{document}




subcaptionapproach from the answer given in the question you linked. You can divide the horizontal space in fractions of\linewidthlike\begin{subfigure}{.5\linewidth}. If you absolutely must, enclose your subfigures inside a\makebox[\linewidth]{}to make them overlap the margins. – Christoph90 Apr 09 '18 at 07:59