基于物理弹簧模型将顶点放置在平面或 3D 空间中。
用法
layout_with_kk(
graph,
coords = NULL,
dim = c(2, 3),
maxiter = 50 * vcount(graph),
epsilon = 0,
kkconst = max(vcount(graph), 1),
weights = NULL,
minx = NULL,
maxx = NULL,
miny = NULL,
maxy = NULL,
minz = NULL,
maxz = NULL,
niter = deprecated(),
sigma = deprecated(),
initemp = deprecated(),
coolexp = deprecated(),
start = deprecated()
)
with_kk(...)
参数
- graph
输入图。 边方向被忽略。
- 坐标
如果不是
NULL
,则起始坐标应在此处给出,以两列或三列矩阵形式,具体取决于dim
参数。- dim
整数标量,2 或 3,布局的维度。二维布局放置在平面上,三维布局放置在 3D 空间中。
- maxiter
要执行的最大迭代次数。 算法可能会提前终止,请参阅
epsilon
参数。- epsilon
数值标量,如果最大增量小于此值,则算法终止。(有关增量的含义,请参见下面的参考。)如果将其设置为零,则函数始终执行
maxiter
迭代。- kkconst
数值标量,Kamada-Kawai 顶点吸引常数。 典型(和默认)值为顶点数。
- weights
边权重,较大的值将导致较长的边。 请注意,这与
layout_with_fr()
相反,后者为较大的权重产生较短的边。 权重必须为正数。- minx
如果不是
NULL
,则它必须是一个数值向量,为顶点的“x”坐标提供下限。 向量的长度必须与图中的顶点数匹配。- maxx
类似于
minx
,但给出了上限。- miny
类似于
minx
,但给出了“y”坐标的下限。- maxy
类似于
minx
,但给出了“y”坐标的上限。- minz
类似于
minx
,但给出了“z”坐标的下限。- maxz
类似于
minx
,但给出了“z”坐标的上限。- niter, sigma, initemp, coolexp
- start
为了兼容性,已弃用的
coords
同义词。- ...
传递给
layout_with_kk()
。
参见
layout_with_drl()
, plot.igraph()
, tkplot()
其他图布局:add_layout_()
, component_wise()
, layout_()
, 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_gem()
, layout_with_graphopt()
, layout_with_lgl()
, layout_with_mds()
, layout_with_sugiyama()
, merge_coords()
, norm_coords()
, normalize()
作者
Gabor Csardi csardi.gabor@gmail.com