python-igraph中有一個圖g
。我可以得到一個VertexCluster
社會結構如下:使用python繪製社區igraph
community = g.community_multilevel()
community.membership
讓我在圖中的所有頂點組成員的名單。
我的問題很簡單,但我沒有在SO上找到python特定的答案。我如何繪製其社區結構的可視化圖?最好爲PDF,所以像
layout = g.layout("kk")
plot(g, "graph.pdf", layout=layout) # Community detection?
非常感謝。
感謝您的捷徑! – jayelm