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