如果您从 R 中使用 igraph,请使用此选项
| layout_with_mds {igraph} | R 文档 |
对图的顶点上定义的一些距离矩阵进行多维尺度变换。
layout_with_mds(graph, dist = NULL, dim = 2, options = arpack_defaults)
with_mds(...)
图 |
输入图。 |
dist |
多维尺度变换的距离矩阵。如果 |
dim |
|
选项 |
目前已被忽略,因为 ARPACK 不再用于解决特征值问题 |
... |
传递给 |
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。
其他图布局: 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)