I am trying to draw these graphs with labels in Latex.
I already drew a graph in this style with this code:
\documentclass[tikz, border=5]{standalone}
\usetikzlibrary{calc,arrows}
\tikzset{
every node/.append style={circle, minimum size=4pt,fill},
every label/.append style={rectangle},
>=latex}
\begin{document}
\begin{tikzpicture}
\node (1) [label=left:1] {};
\node (7) [label=left:7, above right of=1] {};
\node (8) [label=right:8, right of=7] {};
\node (2) [label=right:2, below right of=8] {};
\node (5) [label=left:5, above of=7] {};
\node (6) [label=right:6, right of=5] {};
\node (3) [label=left:3, above left of=5] {};
\node (4) [label=right:4, above right of=6]{};
\draw (1) -- (2) -- (4) -- (3) -- (1) --(7) -- (2) -- (8) -- (6) -- (3) -- (5) -- (7) -- (8);
\draw (4) -- (6) -- (5);
\end{tikzpicture}
\end{document}
Aucun commentaire:
Enregistrer un commentaire