How to make grouped layout in igraph?

后端 未结 4 1593
旧时难觅i
旧时难觅i 2020-12-01 11:17

In igraph, after applying a modularization algorithm to find graph communites, i would like to draw a network layout which clearly makes visible the distinct co

4条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-01 11:58

    One solution would be to set the edge weights of the graph, based on the modularization. Set the within-module edges to some large weight, and the between module edges to some small weight. Then call layout.fruchterman.reingold(), or any algorithm that support edge weights.

    You may need to play a bit with the actual weight values, because that depends on your graph.

提交回复
热议问题