我g
在 python-igraph 中有一个图表。我可以通过以下方式获得VertexCluster
社区结构:
community = g.community_multilevel()
community.membership
给我一个图表中所有顶点的组成员列表。
我的问题很简单,但我还没有在 SO 上找到特定于 python 的答案。如何绘制具有社区结构可视化的图表?最好是PDF,所以像
layout = g.layout("kk")
plot(g, "graph.pdf", layout=layout) # Community detection?
非常感谢。