I have the following code:
\documentclass[letterpaper]{article}
\usepackage{tikz}
\tikzset{
node distance=3cm, % specifies the minimum distance between two nodes. Change if necessary.
every node/.style={circle,thin, fill=black}, % sets the properties for each ’state’ node
}
\begin{document}
Uma representação geométrica deste plano segue abaixo.
\begin{figure}[H]
\centering
\begin{tikzpicture}[node distance = 3cm,
every node/.style={
circle, thin, inner sep = 2pt,fill, black!80
},
black!80
]
\node[label = {$1$}] (1) {};
\node[right of=1,label = {$2$}] (2) {};
\node[right of=2,label = {$3$}] (3) {};
\node[below of=1,label = left:{$4$}] (4) {};
\node[below of=2,label = {[label distance = .12cm]10:$5$}] (5) {};
\node[below of=3,label = right:{$6$}] (6) {};
\node[below of=4,label = below:{$7$}] (7) {};
\node[below of=5,label = below:{$8$}] (8) {};
\node[below of=6,label = below:{$9$}] (9) {};
\draw[-]
(1) edge[asparagus] (2)
(2) edge[asparagus] (3)
(4) edge[red!80] (5)
(5) edge[red!80] (6)
(7) edge[purple] (8)
(8) edge[purple] (9)
(3) edge[orange!80] (5)
(5) edge[orange!80] (7)
(1) edge[gray] (5)
(5) edge[gray] (9)
(3) edge[bleudefrance!80] (6)
(6) edge[bleudefrance!80] (9)
(1) edge[cyan!80] (4)
(4) edge[cyan!80] (7)
(2) edge[pink] (5)
(5) edge[pink] (8)
(2) edge[dashed] (4)
(4) edge[dashed, out=225, in=225, looseness=2] (9)
(1) edge[orange!80,dashed, out=200, in=225,looseness=2.5] (8)
(8) edge[orange!80,dashed] (6)
(3) edge[purple,dashed, out=140, in = 140, looseness =2] (4)
(4) edge[purple,dashed] (8)
(6) edge[cyan,dashed] (2)
(2) edge[cyan,dashed, out=140, in=140, looseness = 2.5] (7);
\end{tikzpicture}
\end{figure}
\end{document}
Which gives me the following output:
As it's visible in the output, there is way too much vertical space between the space and the figure. This also happens if I try to write after the figure, i.e., there is also a big vertical space if I add text after the figure. Is there a way to decrease this spacing?




bboxlibrary is the result of one of the answers to the first linked question. – Qrrbrbirlbel Nov 19 '22 at 16:32below ofis deprecated (though has barely any effect here). Further reading: Q9386, A94396. – Qrrbrbirlbel Nov 19 '22 at 16:36