Advertisement
Guest User

Untitled

a guest
Sep 18th, 2019
512
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. fig, ax = plt.subplots(nrows=2, ncols=2,figsize=(20,20))
  2.  
  3. nx.draw(G0, with_labels=True, node_size=700, node_color="#e1575c",
  4. edge_color='#363847', pos=nx.circular_layout(G0),ax=ax[0,0])
  5. ax[0,0].set_title("Circular layout")
  6.  
  7. nx.draw(G0, with_labels=True, node_size=700, node_color="#e1575c",
  8. edge_color='#363847', pos=nx.random_layout(G0),ax=ax[0,1])
  9. ax[0,1].set_title("Random layout")
  10.  
  11. nx.draw(G0, with_labels=True, node_size=700, node_color="#e1575c",
  12. edge_color='#363847', pos=nx.spring_layout(G0),ax=ax[1,0])
  13. ax[1,0].set_title("Spring layout")
  14.  
  15. nx.draw(G0, with_labels=True, node_size=700, node_color="#e1575c",
  16. edge_color='#363847', pos=nx.spectral_layout(G0),ax=ax[1,1])
  17. ax[1,1].set_title("Spectral layout")
  18.  
  19. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement