Skip to content

Instantly share code, notes, and snippets.

@RobertTalbert
Created September 26, 2024 15:59
Show Gist options
  • Save RobertTalbert/6437b636386b421898dbb5ee56afdd47 to your computer and use it in GitHub Desktop.
Save RobertTalbert/6437b636386b421898dbb5ee56afdd47 to your computer and use it in GitHub Desktop.
# Generate a random tree
random_tree = nx.random_tree(n)
# Draw the tree
nx.draw(random_tree, with_labels=True, node_color="lightblue", font_weight="bold")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment