[Tex/LaTex] Placing 5 figures in 3 rows

floatssubfloats

I have five figures I want arranged in three rows of 2, 2 and 1. The first row contains 2 figures (like I want), but for some reason the next three figures are placed in their own rows. I cannot figure out why, I have tried adding \par\medskip which I have seen someone suggest, or combining subfigures and minipage environments, but that hasn't worked either.

\begin{figure}[h]
    \captionsetup{width=0.7\linewidth}
    \begin{subfigure}{.5\linewidth}
    \centering
    \includegraphics[width=70mm,scale=.3]{Figures/07-Appendix/BoxPlots/BoxRugo.png}
    \caption{}
    \label{fig:time1}
    \end{subfigure}%
    \begin{subfigure}{.5\linewidth}
    \centering
    \includegraphics[width=70mm,scale=.3]{Figures/07-Appendix/BoxPlots/BoxFormFac.png}
    \caption{}
    \label{fig:time2}
    \end{subfigure}
    \begin{subfigure}{\linewidth}
    \centering
    \includegraphics[width=70mm,scale=.3]{Figures/07-Appendix/BoxPlots/BoxVert.png}
    \caption{}
    \label{fig:time3}
    \end{subfigure}
    \begin{subfigure}{\linewidth}
    \centering
    \includegraphics[width=70mm,scale=.3]{Figures/07-Appendix/BoxPlots/BoxReg.png}
    \caption{}
    \label{fig:time3}
    \end{subfigure}
    \begin{subfigure}{\linewidth}
    \centering
    \includegraphics[width=70mm,scale=.3]{Figures/07-Appendix/BoxPlots/BoxPerimAreaRat.png}
    \caption{}
    \label{fig:time3}
    \end{subfigure}
    \caption{\textit{Boxplots}}
    \label{fig:time}
    \end{figure}

Best Answer

You're asking to set the last three boxes at \linewidth, so they occupy the whole line.

Use 0.49\columnwidth to leave some space between the figures on the same line and don't use width=70mm and scale=0.3, but width=\textwidth, so the image will be as wide as allowed by subfigure.

If you want the caption text to be in italics, use the appropriate setup, instead of adding explicit formatting instructions.

\documentclass{article}
\usepackage[demo]{graphicx} % <--- remove demo
\usepackage{subcaption}

\captionsetup{textfont=it}

\begin{document}

\begin{figure}[htp]

\begin{subfigure}{0.49\columnwidth}
\centering
\includegraphics[width=\textwidth]{Figures/07-Appendix/BoxPlots/BoxRugo.png}
\caption{}
\label{fig:time1}
\end{subfigure}\hfill
\begin{subfigure}{0.49\columnwidth}
\centering
\includegraphics[width=\textwidth]{Figures/07-Appendix/BoxPlots/BoxFormFac.png}
\caption{}
\label{fig:time2}
\end{subfigure}

\begin{subfigure}{0.49\columnwidth}
\centering
\includegraphics[width=\textwidth]{Figures/07-Appendix/BoxPlots/BoxVert.png}
\caption{}
\label{fig:time3}
\end{subfigure}\hfill
\begin{subfigure}{0.49\columnwidth}
\centering
\includegraphics[width=\textwidth]{Figures/07-Appendix/BoxPlots/BoxReg.png}
\caption{}
\label{fig:time4}
\end{subfigure}

\begin{subfigure}{0.49\columnwidth}
\centering
\includegraphics[width=\textwidth]{Figures/07-Appendix/BoxPlots/BoxPerimAreaRat.png}
\caption{}
\label{fig:time5}
\end{subfigure}

\caption{Boxplots}
\label{fig:time}

\end{figure}

\end{document}

enter image description here

You may want to add \medskip between the rows; if you also add a top level \centering (after \begin{figure}[htp]), you'd get

\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{subcaption}

\captionsetup{textfont=it}

\begin{document}

\begin{figure}[htp]
\centering

\begin{subfigure}{0.49\columnwidth}
\centering
\includegraphics[width=\textwidth]{Figures/07-Appendix/BoxPlots/BoxRugo.png}
\caption{}
\label{fig:time1}
\end{subfigure}\hfill
\begin{subfigure}{0.49\columnwidth}
\centering
\includegraphics[width=\textwidth]{Figures/07-Appendix/BoxPlots/BoxFormFac.png}
\caption{}
\label{fig:time2}
\end{subfigure}

\medskip

\begin{subfigure}{0.49\columnwidth}
\centering
\includegraphics[width=\textwidth]{Figures/07-Appendix/BoxPlots/BoxVert.png}
\caption{}
\label{fig:time3}
\end{subfigure}\hfill
\begin{subfigure}{0.49\columnwidth}
\centering
\includegraphics[width=\textwidth]{Figures/07-Appendix/BoxPlots/BoxReg.png}
\caption{}
\label{fig:time4}
\end{subfigure}

\medskip

\begin{subfigure}{0.49\columnwidth}
\centering
\includegraphics[width=\textwidth]{Figures/07-Appendix/BoxPlots/BoxPerimAreaRat.png}
\caption{}
\label{fig:time5}
\end{subfigure}

\caption{Boxplots}
\label{fig:time}

\end{figure}

\end{document}

enter image description here