I would like to reduce the space between a figure and a section. I have tried to use How to change the spacing between figures/tables and text? but it didn't work. The latex script I have used
\setlength{\textfloatsep}{10pt plus 1.0pt minus 2.0pt}
An example of my code:
\begin{figure}[ht]
\begin{center}
\includegraphics[width=0.8\textwidth]{images/supervised_unsupervised_learning.png}
\end{center}
\caption{The timeline of the deep learning advancements \cite{Parekh2019}}
\label{fig:supervised_unsupervised_learning}
\end{figure}
\setlength{\textfloatsep}{10pt plus 1.0pt minus 2.0pt}
\subsection{Deep Learning}
example-imageas an image available for tests) but don't do\setlength{\textfloatsep}{10pt plus 1.0pt minus 2.0pt}mid-document the behaviour if you do that is deterministic but hard to explain and almost certainly never what you want. Only set those parameters in the document preamble. – David Carlisle Aug 17 '20 at 12:56\textfloatsepwould affect a top floattbut you are also allowinghand it has no effect if thehoption is taken. – David Carlisle Aug 17 '20 at 13:11