I followed this post to get a figure to be aligned in a grid. I am using double column format to my text, and it seems like whenever the figure reaches the end of a column, it pushes all of the content of that was supposed to be in that column to the bottom of the page and floats out of the page (screenshot).
I found that adding an extra paragraphs of text so that the figure starts on the right column will make it so that everything looks okay. Are there any elegant solutions to this, or do i just have to live with making sure that the figure never hits the bottom of the page?
To avoid confusion, I use the subcaption package for the subfigures.
Code below:
\lipsum[1-10]
\begin{figure}
\centering
\begin{subfigure}{.4\columnwidth}
\includegraphics[width=\columnwidth]{a.png}
\caption{a caption}
\label{fig:a}
\end{subfigure}
\begin{subfigure}{.4\columnwidth}
\includegraphics[width=\columnwidth]{b.png}
\caption{b caption}
\label{fig:b}
\end{subfigure}
\begin{subfigure}{.4\columnwidth}
\includegraphics[width=\columnwidth]{c.png}
\caption{c}
\label{fig:c}
\end{subfigure}
\begin{subfigure}{.4\columnwidth}
\includegraphics[width=\columnwidth]{d.png}
\caption{d caption}
\label{fig:d}
\end{subfigure}
\caption{fig caption}
\label{fig:fig_all}
\end{figure}



