R igraph 手册页

如果您从 R 中使用 igraph,请使用此选项

layout_with_mds {igraph}R 文档

通过多维尺度变换进行图布局

描述

对图的顶点上定义的一些距离矩阵进行多维尺度变换。

用法

layout_with_mds(graph, dist = NULL, dim = 2, options = arpack_defaults)

with_mds(...)

参数

输入图。

dist

多维尺度变换的距离矩阵。如果 NULL (默认),则使用未加权的最短路径矩阵。

dim

layout_with_mds 支持高达节点数减一的维度,但前提是图是连通的;对于非连通图,唯一可能的值是 2。这是因为 merge_coords 仅在 2D 中有效。

选项

目前已被忽略,因为 ARPACK 不再用于解决特征值问题

...

传递给 layout_with_mds

详细信息

layout_with_mds 使用度量多维尺度变换来生成坐标。多维尺度变换旨在将来自较高维度空间中的点放置在(通常)二维平面中,以便尽可能保持点之间的距离。

默认情况下,igraph 使用最短路径矩阵作为节点之间的距离,但用户可以通过 dist 参数覆盖此设置。

此函数分别为每个图组件生成布局,然后通过 merge_coords 合并它们。

一个具有 dim 列的数值矩阵。

作者

Tamas Nepusz ntamas@gmail.com 和 Gabor Csardi csardi.gabor@gmail.com

参考

Cox, T. F. and Cox, M. A. A. (2001) 多维尺度变换。第二版。Chapman and Hall。

参见

layout, plot.igraph

其他图布局: 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_gem(), layout_with_graphopt(), layout_with_kk(), layout_with_lgl(), layout_with_sugiyama(), layout_(), merge_coords(), norm_coords(), normalize()

示例


g <- sample_gnp(100, 2/100)
l <- layout_with_mds(g)
plot(g, layout=l, vertex.label=NA, vertex.size=3)

[包 igraph 版本 1.3.5 索引]