[Tex/LaTex] Reduce space below a figure

floatsspacingtikz-pgf

Due to the page limit, I now wish to reduce the blank space right after a figure (a TikZ drawing).

I personally find it too big.

Below is my MWE. How may I fix it?

\documentclass[a4paper]{article}

\usepackage{lipsum} % for dummy text only
\usepackage{tikz} % for TikZ drawing

\begin{document}
\lipsum
The system architecture is shown in Figure~\ref{fig:systemarchitecture}.
\begin{figure}
    \centering
    \begin{tikzpicture}[block/.style={draw, fill=white, rectangle, minimum width=0.95*\columnwidth, anchor=west}, font=\small]
\node[block, minimum width=0.9*\columnwidth, minimum height = 3cm, fill=yellow, opacity=1, text opacity=1](phone) at (0,0){};
    \end{tikzpicture}
    \caption{System Architecture}
    \label{fig:systemarchitecture}
\end{figure}
\end{document}

Best Answer

An quick fix without using package is to add a negative length to

`\abovecaptionskip{-<dimension>}` and `\belowcaptionskip{-<dimension>}`

which adjust the vertical space before and after the caption, as shown below.

enter image description here

\documentclass[a4paper]{article}

\usepackage{lipsum} % for dummy text only
\usepackage{tikz} % for TikZ drawing
\addtolength\abovecaptionskip{-10pt}  %%%%
\addtolength\belowcaptionskip{-20pt}  %%%%
\begin{document}
\lipsum
The system architecture is shown in Figure~\ref{fig:systemarchitecture}.
\begin{figure}
    \centering
    \begin{tikzpicture}[block/.style={draw, fill=white, rectangle, minimum width=0.95*\columnwidth, anchor=west}, font=\small]
\node[block, minimum width=0.9*\columnwidth, minimum height = 3cm, fill=yellow, opacity=1, text opacity=1](phone) at (0,0){};
    \end{tikzpicture}
    \caption{System Architecture}
    \label{fig:systemarchitecture}
\end{figure}
\end{document

}