Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def printDegreeHistogram(G, nbins=25):
""" Prints a degree histogram as a bar chart to the terminal"""
hist = GraphProperties.degreeDistribution(G)
(labels, hist) = compressHistogram(hist, nbins)
termgraph.graph(labels, hist)
print("==================")
print("Basic Properties")
print(tabulate.tabulate(basicProperties))
print("Node Degree Properties")
print(tabulate.tabulate(degreeProperties))
print("Path Structure")
print(tabulate.tabulate(pathStructure))
#print("Miscellaneous")
#print(tabulate.tabulate(miscProperties))
print("Community Structure")
print(tabulate.tabulate(communityStructure))
print("Degree Distribution")
print("-------------------")
(labels, histo) = props["histo"]
if labels and histo:
termgraph.graph(labels, histo)