R: pivot MDS graph layout

layout_pmds {graphlayouts} | R Documentation

## pivot MDS graph layout

### Description

similar to layout_with_mds but uses only a small set of pivots for MDS. Considerably faster than MDS and thus applicable for larger graphs.

### Usage

    layout_with_pmds(g, pivots, weights = NA)

    layout_igraph_pmds(g, pivots, weights = NA, circular)

### Arguments

`g` | igraph object
`pivots` | number of pivots
`weights` | possibly a numeric vector with edge weights. If this is NULL and the graph has a weight edge attribute, then the attribute is used. If this is NA then no weights are used (even if the graph has a weight attribute). By default, weights are ignored. See details for more.
`circular` | not used

### Details

Be careful when using weights. In most cases, the inverse of the edge weights should be used to ensure that the endpoints of an edges with higher weights are closer together (weights=1/E(g)$weight)

The layout_igraph_* function should not be used directly. It is only used as an argument for plotting with 'igraph'. 'ggraph' natively supports the layout.

### Value

matrix of xy coordinates

### Author(s)

David Schoch

### References

Brandes, U. and Pich, C. (2006). Eigensolver Methods for Progressive Multidimensional Scaling of Large Data. In International Symposium on Graph Drawing (pp. 42-53). Springer

### Examples

    ## Not run:
    library(igraph)
    library(ggraph)

    g <- sample_gnp(1000,0.01)

    xy <- layout_with_pmds(g,pivots = 100)

    ## End(Not run)

[Package graphlayouts version 0.5.0 Index]