[Tex/LaTex] How to stack two figures on top of each other, rather than side to side

floatsplotsubfloats

I'd like my figures to be one on top of the other, rather than next to each other, so that they are larger and spread along the page width. How do I do this? Here is my code:

\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[width=0.8\textwidth]{Nvariousg1}
\caption{}
\label{fig:Ng1}
\end{subfigure}
\begin{subfigure}[b]{0.3\textwidth}
\includegraphics[width=0.8\textwidth]{Nvariousg2}
\caption{}
\label{fig:Ng2}
\end{subfigure}
\caption{(a) Numerical solutions for the small-time system with a constant-curvature body shape showing the scaled leading-order veritcal reaction force $N_0$ versus the scaled body mass $M$ for various values of $g$. Again, $I=M$ for definiteness and $A=0.7$. (b) As for (a) but over a wider range of values of $M,I$.}
\end{figure}


Best Answer

Since you're looking to make the two graphs larger, you could (a) increase the widths of the two subfigure environments to, say, 0.75\textwidth and (b) set the widths of the graphs to 1\linewidth, i.e., to the full width of the enclosing subfigure environments. LaTeX will automatically insert a line break between the two subfigures.

\documentclass{article}
\usepackage{subcaption}
\usepackage[demo]{graphicx}  % remove 'demo' option for your real document

\begin{document}
\begin{figure}
\centering
\begin{subfigure}[b]{0.55\textwidth}
\includegraphics[width=1\linewidth]{Nvariousg1}
\caption{}
\label{fig:Ng1}
\end{subfigure}

\begin{subfigure}[b]{0.55\textwidth}
\includegraphics[width=1\linewidth]{Nvariousg2}
\caption{}
\label{fig:Ng2}
\end{subfigure}

\caption[Two numerical solutions]{(a) Numerical solutions for the small-time system
with a constant-curvature body shape showing the scaled leading-order veritcal
reaction force $N_0$ versus the scaled body mass $M$ for various values of $g$.
Again, $I=M$ for definiteness and $A=0.7$. (b) As for (a) but over a wider range of
values of $M,I$.}
\end{figure}
\end{document}