I have the following code:
\documentclass[a4paper, twocolumn]{article}
\usepackage[a4paper, portrait, right=1.5cm, left=1.5cm, bottom=1.5cm, top=1.5cm]{geometry}
\usepackage{graphicx}
\usepackage{float}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepackage{caption}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength{\headheight}{0cm}
\fancyhead{}
\lhead{s}
\rhead{s}
\fancyfoot{}
\renewcommand{\footrulewidth}{0.4pt}
\rfoot{Page \thepage\ of 2}
\lfoot{s}
\begin{document}
\section{ssds}
\subsection{asdf}
Hflesufesh hfqw lypelh, hfy jexxeoqtu gwwsiphqetw gly igny:
\begin{itemize}
\item Gsrwspmhexmsr sj werh lettirw mqqihmexipc, erh xlyw xli wixxpiqirx sj werh ger fi mkrsvih.
\item Gvzr-qrcraqrag frggyrzrag bs pynl pna or vtaberq, naq bayl frggyrzrag qhr gb ybnqvat vf considered.
\item Hfy weqx qw yxgwhqc, gtn hfsw hfy plqtcqpxy ej wspylpewqhqet cgt ry gppxqyn.
\end{itemize}
\section{rgrgrgt}
F qrpwmpst pv gd qx bdsvgkrbgxm npge f kpst qxfh idrsmfgpds ds f vpgx nexkx gex vdpw okdipwx bdsvpvgv di 3h di mxsvx vfsm dcxkwjpst f 5 n mkvhr clpdq tvmk ly jidq-hjybjcvslmvjy qlmvj jo 1, tkvhk jidqcvdb qjhr. Mkd bjvc uqjudqmvdb jo mkd hclp lqd $C_c = 0.25,\ C_l = 0.05,\ \delta_{\rm{wgh}} = 38 \rm{mT/i}^3$,uko ykj gbbn $\sigma_{\rm{wgh}} = 18 \rm{mT/i}^3$, $U_w=2.65$, zmg ayr hzare azkqr jp 2b krqxh ayr pxjq pleczvr. Hr hjqq cjmg ayr praaqrbrmap hyrm z paerpp xc 100fIz jp ziiqjrg kd ayr kljqgjmn, zmg ayr gjccrermajzq praaqrbrma krahrrm ayr vrmaer qjmr xc ayr ejmn krzb zmg lmgre ayr vrmaer xc qxzgrg zerz xc ayr krzb. Ayr jmmre zmg xlare ezgjj xc ayr ejmn krzb zer 8b zmg 12b erpirvajwrqd.
Praaqrbrma xc pzmg zmg nezwrq hjqq kr jnmxerg.
\begin{figure}[H]
\centering
\includegraphics[width = 5cm, height = 5cm]{example-image-a}
\caption{Figure}
\label{plan}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width = 5cm, height = 7cm]{example-image-b}
\caption{Figure}
\label{elevation}
\end{figure}
\end{document}
(Apologies for having lots of text, I removed as much as I could without the issue disappearing.)
The gap between \items is unusually large:
But when I remove one of the figures, it goes back to normal:
\documentclass[a4paper, twocolumn]{article}
\usepackage[a4paper, portrait, right=1.5cm, left=1.5cm, bottom=1.5cm, top=1.5cm]{geometry}
\usepackage{graphicx}
\usepackage{float}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepackage{caption}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength{\headheight}{0cm}
\fancyhead{}
\lhead{s}
\rhead{s}
\fancyfoot{}
\renewcommand{\footrulewidth}{0.4pt}
\rfoot{Page \thepage\ of 2}
\lfoot{s}
\begin{document}
\section{ssds}
\subsection{asdf}
Hflesufesh hfqw lypelh, hfy jexxeoqtu gwwsiphqetw gly igny:
\begin{itemize}
\item Gsrwspmhexmsr sj werh lettirw mqqihmexipc, erh xlyw xli wixxpiqirx sj werh ger fi mkrsvih.
\item Gvzr-qrcraqrag frggyrzrag bs pynl pna or vtaberq, naq bayl frggyrzrag qhr gb ybnqvat vf considered.
\item Hfy weqx qw yxgwhqc, gtn hfsw hfy plqtcqpxy ej wspylpewqhqet cgt ry gppxqyn.
\end{itemize}
\section{rgrgrgt}
F qrpwmpst pv gd qx bdsvgkrbgxm npge f kpst qxfh idrsmfgpds ds f vpgx nexkx gex vdpw okdipwx bdsvpvgv di 3h di mxsvx vfsm dcxkwjpst f 5 n mkvhr clpdq tvmk ly jidq-hjybjcvslmvjy qlmvj jo 1, tkvhk jidqcvdb qjhr. Mkd bjvc uqjudqmvdb jo mkd hclp lqd $C_c = 0.25,\ C_l = 0.05,\ \delta_{\rm{wgh}} = 38 \rm{mT/i}^3$,uko ykj gbbn $\sigma_{\rm{wgh}} = 18 \rm{mT/i}^3$, $U_w=2.65$, zmg ayr hzare azkqr jp 2b krqxh ayr pxjq pleczvr. Hr hjqq cjmg ayr praaqrbrmap hyrm z paerpp xc 100fIz jp ziiqjrg kd ayr kljqgjmn, zmg ayr gjccrermajzq praaqrbrma krahrrm ayr vrmaer qjmr xc ayr ejmn krzb zmg lmgre ayr vrmaer xc qxzgrg zerz xc ayr krzb. Ayr jmmre zmg xlare ezgjj xc ayr ejmn krzb zer 8b zmg 12b erpirvajwrqd.
Praaqrbrma xc pzmg zmg nezwrq hjqq kr jnmxerg.
\begin{figure}[H]
\centering
\includegraphics[width = 5cm, height = 5cm]{example-image-a}
\caption{Figure}
\label{plan}
\end{figure}
\end{document}
How can I make the spacing as it is in the second code but with the second figure still present as in the first code?


twocolumnis\flushbottomso vertical spaces stretch to make the last line reach the bottom of the page, use\raggedbottomor don't use[H]which by design chooses bad white space. – David Carlisle Oct 15 '23 at 07:33Hdisables floats, so you get the bad space unless you re-write text to fit. – David Carlisle Oct 15 '23 at 07:35\raggedbottomfixed the issue. I need to use[H], otherwise the diagram becomes the first thing on the page (first thing in the document), which I don't want. – Just_A_User Oct 15 '23 at 07:42H, it just all goes to the bottom – David Carlisle Oct 15 '23 at 07:45[hbp]to allow float but not allowttop. – David Carlisle Oct 15 '23 at 07:46Hwas my idea, but some ideas it would have been better not to have. – David Carlisle Oct 15 '23 at 07:47