Skip to content

Instantly share code, notes, and snippets.

@julian-west
Created September 7, 2019 17:00
Show Gist options
  • Save julian-west/9e1fce7882058e2200154723989886e9 to your computer and use it in GitHub Desktop.
Save julian-west/9e1fce7882058e2200154723989886e9 to your computer and use it in GitHub Desktop.
fig, ax = plt.subplots(nrows=2, ncols=2,figsize=(20,20))
nx.draw(G0, with_labels=True, node_size=700, node_color="#e1575c",
edge_color='#363847', pos=nx.circular_layout(G0),ax=ax[0,0])
ax[0,0].set_title("Circular layout")
nx.draw(G0, with_labels=True, node_size=700, node_color="#e1575c",
edge_color='#363847', pos=nx.random_layout(G0),ax=ax[0,1])
ax[0,1].set_title("Random layout")
nx.draw(G0, with_labels=True, node_size=700, node_color="#e1575c",
edge_color='#363847', pos=nx.spring_layout(G0),ax=ax[1,0])
ax[1,0].set_title("Spring layout")
nx.draw(G0, with_labels=True, node_size=700, node_color="#e1575c",
edge_color='#363847', pos=nx.spectral_layout(G0),ax=ax[1,1])
ax[1,1].set_title("Spectral layout")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment