| layout.mds {igraph} | R Documentation |
Multidimensional scaling of some distance matrix defined on the vertices of a graph.
layout.mds(graph, dist=NULL, dim=2, options=igraph.arpack.default)
graph |
The input graph. |
dist |
The distance matrix for the multidimensional scaling.
If |
dim |
|
options |
This is currently ignored, as ARPACK is not used any more for solving the eigenproblem |
layout.mds uses metric multidimensional scaling for generating
the coordinates. Multidimensional scaling aims to place points from a
higher dimensional space in a (typically) 2 dimensional plane, so that
the distance between the points are kept as much as this is possible.
By default igraph uses the shortest path matrix as the distances
between the nodes, but the user can override this via the dist
argument.
This function generates the layout separately for each graph component
and then merges them via layout.merge.
A numeric matrix with dim columns.
Tamas Nepusz ntamas@gmail.com and Gabor Csardi csardi.gabor@gmail.com
Cox, T. F. and Cox, M. A. A. (2001) Multidimensional Scaling. Second edition. Chapman and Hall.
g <- erdos.renyi.game(100, 2/100) l <- layout.mds(g) plot(g, layout=l, vertex.label=NA, vertex.size=3)