Advertisement
Guest User

network

a guest
Jun 18th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. import networkx as nx
  2. import matplotlib.pyplot as plt
  3. G=nx.Graph()
  4. #read file data
  5. readFile=open("directory.txt","r")
  6. for line in readFile:
  7.     spLine=line.split(",")
  8.     G.add_edge(spLine[0],spLine[1])
  9. pos=nx.circular_Layout(G)
  10. nx.draw(G,pos, node_color='b')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement