
| Current Path : /proc/thread-self/root/usr/local/share/doc/networkx-2.5/examples/graph/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //proc/thread-self/root/usr/local/share/doc/networkx-2.5/examples/graph/plot_karate_club.py |
"""
===========
Karate Club
===========
Zachary's Karate Club graph
Data file from:
http://vlado.fmf.uni-lj.si/pub/networks/data/Ucinet/UciData.htm
Zachary W. (1977).
An information flow model for conflict and fission in small groups.
Journal of Anthropological Research, 33, 452-473.
"""
import matplotlib.pyplot as plt
import networkx as nx
G = nx.karate_club_graph()
print("Node Degree")
for v in G:
print(f"{v:4} {G.degree(v):6}")
nx.draw_circular(G, with_labels=True)
plt.show()