Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # screenshot: http://imgur.com/yHJ4J6V
- # import modules (and assign shorter names)
- import networkx as nx
- import matplotlib.pyplot as plt
- # create graph
- d = nx.DiGraph([(1,2), (1,3), (2,4), (4,3), (4,1)])
- # create draw (in memory)
- nx.draw(d)
- # display all
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement