如果您从 R 中使用 igraph,请使用此选项
| layout_with_gem {igraph} | R 文档 |
使用 GEM 力导向布局算法在平面上放置顶点。
layout_with_gem(
graph,
coords = NULL,
maxiter = 40 * vcount(graph)^2,
temp.max = max(vcount(graph), 1),
temp.min = 1/10,
temp.init = sqrt(max(vcount(graph), 1))
)
with_gem(...)
图 |
输入图。边方向将被忽略。 |
coords |
如果不是 |
maxiter |
要执行的最大迭代次数。更新单个顶点计为一次迭代。合理的默认值是 40 * n * n,其中 n 是顶点数。原始论文建议 4 * n * n,但这通常仅在仔细设置其他参数时才有效。 |
temp.max |
允许的最大局部温度。合理的默认值是顶点数。 |
temp.min |
算法终止时的全局温度(即使在达到 |
temp.init |
所有顶点的初始局部温度。合理的默认值是顶点数的平方根。 |
... |
传递给 |
有关该算法的详细信息,请参阅下面引用的论文。
一个数值矩阵,具有两列,行数与顶点数相同。
Gabor Csardi csardi.gabor@gmail.com
Arne Frick, Andreas Ludwig, Heiko Mehldau: 一种用于无向图的快速自适应布局算法, Proc. Graph Drawing 1994, LNCS 894, pp. 388-403, 1995.
layout_with_fr, plot.igraph, tkplot
其他图布局:add_layout_(), component_wise(), layout_as_bipartite(), layout_as_star(), layout_as_tree(), layout_in_circle(), layout_nicely(), layout_on_grid(), layout_on_sphere(), layout_randomly(), layout_with_dh(), layout_with_fr(), layout_with_graphopt(), layout_with_kk(), layout_with_lgl(), layout_with_mds(), layout_with_sugiyama(), layout_(), merge_coords(), norm_coords(), normalize()
set.seed(42)
g <- make_ring(10)
plot(g, layout=layout_with_gem)