Skip to content

Instantly share code, notes, and snippets.

@RubenZx
Created June 6, 2019 14:05
Show Gist options
  • Save RubenZx/b915273401187a715e896d321939ed8c to your computer and use it in GitHub Desktop.
Save RubenZx/b915273401187a715e896d321939ed8c to your computer and use it in GitHub Desktop.
\documentclass[preview,border=4mm,convert={density=600,outext=.png}]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
\begin{scope}[every node/.style={circle,thick,draw}]
\node (A) at (-3,-2) {0};
\node (B) at (0,-2) {1};
\node (C) at (3,-2){2};
\node (D) at (-3,-4){3};
\node (E) at (3,-4){4};
\node (F) at (-3,-6){5};
\node (G) at (3,-6){6};
\node (H) at (0,-4){7};
\end{scope}
\begin{scope}[>={Stealth[black]},
every node/.style={fill=white,circle},
every edge/.style={draw=black,very thick}]
\path [-] (A) edge [bend left=30]node {$87$} (C);
\path [-] (A) edge node {$16$} (D);
\path [-] (B) edge node {$42$} (C);
\path [-] (B) edge node {$31$} (E);
\path [-] (B) edge node {$58$} (H);
\path [-] (C) edge node {$62$} (E);
\path [-] (C) edge [bend left=35]node {$44$} (G);
\path [-] (D) edge node {$59$} (F);
\path [-] (D) edge node {$79$} (H);
\path [-] (E) edge node {$83$} (F);
\path [-] (E) edge node {$63$} (G);
\path [-] (E) edge node {$32$} (H);
\end{scope}
\end{tikzpicture}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment