igraph的layout布局

做图论的社区检测,需要画图显示,用igraph可以进行可视化。
igraph有几个布局,分别如下:

layout_with_dh : The Davidson-Harel layout algorithm

Place vertices of a graph on the plane, according to the simulated annealing algorithm by Davidson and Harel.
在这里插入图片描述

layout_with_drl:The DrL graph layout generator

DrL is a force-directed graph layout toolbox focused on real-world large-scale graphs, developed by Shawn Martin and colleagues at andia National Laboratories
在这里插入图片描述

layout_with_fr:The Fruchterman-Reingold layout algorithm

Place vertices on the plane using the force-directed layout algorithm by Fruchterman and Reingold.
在这里插入图片描述

layout_with_gem: The GEM layout algorithm

Place vertices on the plane using the GEM force-directed layout algorithm.
在这里插入图片描述

layout_with_graphopt:The graphopt layout algorithm

A force-directed layout algorithm, that scales relatively well to large graphs
在这里插入图片描述

layout_with_kk: The Kamada-Kawai layout algorithm

Place the vertices on the plane, or in the 3d space, based on a phyisical model of springs.
在这里插入图片描述

layout_with_lgl: Large Graph Layout

A layout generator for larger graphs.
在这里插入图片描述

layout_with_mds: Graph layout by multidimensional scaling

Multidimensional scaling of some distance matrix defined on the vertices of a graph. 根据距离缩放来显示
在这里插入图片描述

layout_with_sugiyama: The Sugiyama graph layout generator

Sugiyama layout algorithm for layered directed acyclic graphs. The algorithm minimized edge crossings.
在这里插入图片描述

总结

一共有上述9种布局。
第一种(dh):可以显示出社区与社区间的关系,缺点是社区多了有点分不清。
第二种(drl):不推荐使用
第三种(fr):我比较喜欢的一个布局,可以看清有多少社区。推荐
第四种(gem):不推荐使用
第五种(graphopt):我比较喜欢的一个布局,大的社区放在中间。推荐
第六种(kk):也还不错,可以作为补充选择。
第七种(lgl):不推荐使用,太凌乱
第八种(mds):是个不错的布局,值得推荐,是根据距离缩放来的,可以看得清社区间的联系。
第九种(sugiyama):树状显示,主要为了减少边缘交叉。但是。。。。我不喜欢使用,不推荐。

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

clancy_wu

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值