0

I am working on community detection algorithms, and I am currently trying to visualize the results of Louvain algorithm (https://arxiv.org/abs/0803.0476) on a graph of 70K nodes and 8M edges.

I plotted a smaller graph before (20K nodes, 650K edges) with igraph by taking inspiration from How to plot Community-based graph using igraph for python, and it took almost 30 minutes. Plotting 70K nodes and 8M edges takes 8 hours.

To plot the current graph, due to performance, I moved to sfdp (e.g., sfdp foo.dot -Goutputorder="edgesfirst" -Goverlap=false -Tpdf -O). However, I am not able to achieve a good layout to highlight distinct communities by distantiating them. I tried to tune both K at graph level, and len and/or weight at edge level (by setting high values for intra-communities edges, e.g., 1000; and low values for inter-community edges, e.g., 1). sfdp seems to ignore weights. Still, as an extension of fdp, it should not.

Examples on a small graph

igraph + fruchterman_reingold layout igraph + fruchterman_reingold layout

sfdp

sfdp

Am I missing something? How can I highlight community differences as done in the above link?

w4bo
  • 855
  • 7
  • 14
  • You might want to try [this approach](https://stackoverflow.com/questions/43541376/how-to-draw-communities-with-networkx/43541777): basically: 1) partition your nodes into communities; 2) for each community, determine positions of nodes independently; 3) create a new graph, where each node corresponds to a community and edges correspond to the sum of edges/weights between communities; 4) position communities; 5) combine layouts sensibly. – Paul Brodersen Sep 12 '18 at 11:46
  • You may want to consider Gephi. You can pause the force calcs once it stabilizes. – jonincanada Jan 30 '19 at 23:46

0 Answers0