Skip to content

Instantly share code, notes, and snippets.

@prateekjoshi565
Created December 28, 2019 06:55
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/cbd2b42548f5cf3b95649a24ec15d984 to your computer and use it in GitHub Desktop.
Save prateekjoshi565/cbd2b42548f5cf3b95649a24ec15d984 to your computer and use it in GitHub Desktop.
# create graph
G = nx.from_pandas_edgelist(fb_df, "node_1", "node_2", create_using=nx.Graph())
# plot graph
plt.figure(figsize=(10,10))
pos = nx.random_layout(G, seed=23)
nx.draw(G, with_labels=False, pos = pos, node_size = 40, alpha = 0.6, width = 0.7)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment