#This is a function that plots the network for the input adjacency matrix. # This function is written in Sage Math, and it works best in the notebook envrionment. # The first argument is the adjacency matrix. # The second argument is a dictionary that renames the vertices in the plot. # The dictionary is formated like {0:'First Vertex Name',1:'Second Vertex Name'} and so on. def NetworkPlotter(AdjMatrix,VertexNames): NetworkGraph = DiGraph(AdjMatrix); NetworkGraph.relabel(VertexNames); NetworkGraph.graphplot(talk=True,edge_style='solid',iterations=500).show(figsize=[12,12]);