Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created January 31, 2020 05:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prateekjoshi565/0cf7e8041a97bbf9c6fb226f020362ef to your computer and use it in GitHub Desktop.
Save prateekjoshi565/0cf7e8041a97bbf9c6fb226f020362ef to your computer and use it in GitHub Desktop.
# plot graph
plt.figure(figsize=(9,9))
pos = nx.spring_layout(G, k = 20, seed = 21) # k regulates the distance between nodes
nx.draw(G, with_labels=True, node_color='skyblue', node_size=4000, pos = pos, edgelist=G.edges(), edge_color='g', arrowsize=15)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment