Python - Remove overlapping communities in iGraph plot

南楼画角 提交于 2019-12-25 02:16:41

问题


I've been using iGraph to determine staff community structures within the 2002 Enron corpus. I've extracted a subset of only 50 employees, and am plotting this subset using various community detection algorithms. The problem is that when I use the plot function, numerous nodes will overlap across different communities (communities being defined by colour of node, and colour bubbles). Example:

I want to keep the colour bubbles, however dont want any to overlap. I've tried all the different layouts located here, however bubbles overlapped for every layout. I also couldn't find a parameter that I could specify to solve this. Any help would be appreciated. Code producing plot:

# Newman Eigenvector Approach - Eigenvector Modularity Optimization

from igraph import *
G = Graph.Read_GML('community.gml')
comms = G.community_leading_eigenvector()
plot(comms, mark_groups=True, inline=False, vertex_label = None, layout=layout)

来源:https://stackoverflow.com/questions/51102350/python-remove-overlapping-communities-in-igraph-plot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!