# Figures in two-column document leaves column blank

I have trouble with figures in a two-column document of the class revtex4-1.

In my MWE I have two figures.

For a single column, the two figures are to high to be put one about the other. So the best solution would be to put the second figure in the next column.

However, Latex just leaves the next column completely blank and places the second figure on the next page:

How can I solve this?

Here is a MWE:

\documentclass[reprint,amsmath,amssymb,aps,]{revtex4-1}

\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{algpseudocode}

\begin{document}

\begin{figure}
\begin{algorithmic}
\ForAll{$\tau$}
\ForAll{$\bm G \in \mathcal G_\text{this}$}
\vspace{0.4em}
\ForAll{$i\in\mathcal I$}
\ForAll{$a\in \mathcal A_\text{this}$}
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\EndFor
\EndFor
\ForAll{$i\in \mathcal I$}
\ForAll{$j \in \mathcal I_\text{this}\;,j\leq i$}
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\EndFor
\EndFor
\ForAll{$i\in \mathcal I$}
\ForAll{$j \in \mathcal I_\text{this}\;,j\leq i$}
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\EndFor
\EndFor
\EndFor
\EndFor
\end{algorithmic}
\caption{Pseuocode of blablabla }
\end{figure}

\begin{figure}
\begin{algorithmic}
\ForAll{$\tau$}
\ForAll{$\bm G \in \mathcal G_\text{this}$}
\vspace{0.4em}
\ForAll{$i\in\mathcal I$}
\ForAll{$a\in \mathcal A_\text{this}$}
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\EndFor
\EndFor
\ForAll{$i\in \mathcal I$}
\ForAll{$j \in \mathcal I_\text{this}\;,j\leq i$}
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\EndFor
\EndFor
\ForAll{$i\in \mathcal I$}
\ForAll{$j \in \mathcal I_\text{this}\;,j\leq i$}
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\EndFor
\EndFor
\EndFor
\EndFor
\end{algorithmic}
\caption{Pseuocode of lululu }
\end{figure}

\end{document}

• If you add some text it works fine. Without text it goes into [p] mode. Nov 19, 2016 at 15:07

Alternatively, you can put two minipages into a full width figure.

\documentclass[reprint,amsmath,amssymb,aps,]{revtex4-1}

\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{algpseudocode}

\begin{document}

\begin{figure*}
\begin{minipage}[t]{\dimexpr 0.5\textwidth - 0.5\columnsep}
\begin{algorithmic}
\ForAll{$\tau$}
\ForAll{$\bm G \in \mathcal G_\text{this}$}
\vspace{0.4em}
\ForAll{$i\in\mathcal I$}
\ForAll{$a\in \mathcal A_\text{this}$}
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\EndFor
\EndFor
\ForAll{$i\in \mathcal I$}
\ForAll{$j \in \mathcal I_\text{this}\;,j\leq i$}
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\EndFor
\EndFor
\ForAll{$i\in \mathcal I$}
\ForAll{$j \in \mathcal I_\text{this}\;,j\leq i$}
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\State $XYZ$
\EndFor
\EndFor
\EndFor
\EndFor
\end{algorithmic}
\caption{Pseuocode of blablabla }
\end{minipage}\hfill
\begin{minipage}[t]{\dimexpr 0.5\textwidth - 0.5\columnsep}
\begin{algorithmic}
\ForAll{$\tau$}
\ForAll{$\bm G \in \mathcal G_\text{this}$}
\vspace{0.4em}
\ForAll{$i\in\mathcal I$}
\ForAll{$a\in \mathcal A_\text{this}$}
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\EndFor
\EndFor
\ForAll{$i\in \mathcal I$}
\ForAll{$j \in \mathcal I_\text{this}\;,j\leq i$}
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\EndFor
\EndFor
\ForAll{$i\in \mathcal I$}
\ForAll{$j \in \mathcal I_\text{this}\;,j\leq i$}
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\State $ABC$
\EndFor
\EndFor
\EndFor
\EndFor
\end{algorithmic}
\caption{Pseuocode of lululu }
\end{minipage}
\end{figure*}

\end{document}