Floats – How to Solve Problem in Subfigure 2X2

floatssubcaption

I try to put figures in 2X2, but they appear in 4 rows.

\begin{figure*}
\begin{minipage}{\textwidth}
\centering
\begin{subfigure}[b]{1\textwidth}
\centering
    \includegraphics[scale=0.3]{images/mean/N14.png}
    \caption[Network2]%
    {{\small Network 1}}    
\label{fig:mean and std of net14}
\end{subfigure}
\quad
 \begin{subfigure}[b]{1\textwidth}  
 \centering 
        \includegraphics[scale=0.29]{images/mean/N24.png}
        \caption[]%
        {{\small Network 2}}    
        \label{fig:mean and std of net24}
        \end{subfigure}

    \begin{subfigure}[b]{1\textwidth}   
 \centering 
        \includegraphics[scale=0.29]{images/mean/N34.png}
        \caption[]%
        {{\small Network 3}}    
        \label{fig:mean and std of net34}
        \end{subfigure}
        \quad
        \begin{subfigure}[b]{1\textwidth}   
 \centering 
        \includegraphics[scale=0.29]{images/mean/N44.png}
        \caption[]%
        {{\small Network 4}}    
        \label{fig:mean and std of net44}
        \end{subfigure}


        \caption[ The average and standard deviation of critical parameters ]
        {\small The average and standard deviation of critical parameters: Region R4} 
        \label{fig:mean and std of nets}
        \end{minipage}
\end{figure*}

Any suggestion please?

Best Answer

Each of your \subfigures is 1\textwidth wide - there's no way LaTeX could fit two of these in a row. Also you don't need the minipage there.

Try something like this:

\documentclass{article}

\usepackage{graphicx}
\usepackage{subcaption}
\usepackage{mwe}

\begin{document}
    \begin{figure*}
        \centering
        \begin{subfigure}[b]{0.475\textwidth}
            \centering
            \includegraphics[width=\textwidth]{Example-Image}
            \caption[Network2]%
            {{\small Network 1}}    
            \label{fig:mean and std of net14}
        \end{subfigure}
        \hfill
        \begin{subfigure}[b]{0.475\textwidth}  
            \centering 
            \includegraphics[width=\textwidth]{Example-Image}
            \caption[]%
            {{\small Network 2}}    
            \label{fig:mean and std of net24}
        \end{subfigure}
        \vskip\baselineskip
        \begin{subfigure}[b]{0.475\textwidth}   
            \centering 
            \includegraphics[width=\textwidth]{Example-Image}
            \caption[]%
            {{\small Network 3}}    
            \label{fig:mean and std of net34}
        \end{subfigure}
        \hfill
        \begin{subfigure}[b]{0.475\textwidth}   
            \centering 
            \includegraphics[width=\textwidth]{Example-Image}
            \caption[]%
            {{\small Network 4}}    
            \label{fig:mean and std of net44}
        \end{subfigure}
        \caption[ The average and standard deviation of critical parameters ]
        {\small The average and standard deviation of critical parameters: Region R4} 
        \label{fig:mean and std of nets}
    \end{figure*}
\end{document}

2x2 output

Of course you would drop the \usepackage{mwe} and substitute your pictures back in at appropriate scaling.