# layout.mds

0th

Percentile

##### Graph layout by multidimensional scaling

Multidimensional scaling of some distance matrix defined on the vertices of a graph.

Keywords
graphs
##### Usage
layout.mds(graph, dist=NULL, dim=2, options=igraph.arpack.default)
##### Arguments
graph
The input graph.
dist
The distance matrix for the multidimensional scaling. If NULL (the default), then the unweighted shortest path matrix is used.
dim
layout.mds supports dimensions up to the number of nodes minus one, but only if the graph is connected; for unconnected graphs, the only possible values is 2. This is because layout.merge only works in 2D.
options
This is currently ignored, as ARPACK is not used any more for solving the eigenproblem
##### Details

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.

##### Value

• A numeric matrix with dim columns.

Graph layout

##### References

Cox, T. F. and Cox, M. A. A. (2001) Multidimensional Scaling. Second edition. Chapman and Hall.

layout, plot.igraph

• layout.mds
##### Examples
g <- erdos.renyi.game(100, 2/100)
l <- layout.mds(g)
plot(g, layout=l, vertex.label=NA, vertex.size=3)
Documentation reproduced from package igraph, version 0.6.5-2, License: GPL (>= 2)

### Community examples

Looks like there are no examples yet.