Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import networkx as nx
- import matplotlib.pyplot as plt
- G=nx.Graph()
- #read file data
- readFile=open("directory.txt","r")
- for line in readFile:
- spLine=line.split(",")
- G.add_edge(spLine[0],spLine[1])
- pos=nx.circular_Layout(G)
- nx.draw(G,pos, node_color='b')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement