layout_as_metromap {graphlayouts}R Documentation

Metro Map Layout

Description

Metro map layout based on multicriteria optimization

Usage

layout_as_metromap(object, xy, l = 2, gr = 0.0025, w = rep(1, 5), bsize = 5)

Arguments

object

original graph

xy

initial layout of the original graph

l

desired multiple of grid point spacing. (l*gr determines desired edge length)

gr

grid spacing. (l*gr determines desired edge length)

w

weight vector for criteria (see details)

bsize

number of grid points a station can move away rom its original position

Details

The function optimizes the following five criteria using a hill climbing algorithm:

Value

new coordinates for stations

Author(s)

David Schoch

References

Stott, Jonathan, et al. "Automatic metro map layout using multicriteria optimization." IEEE Transactions on Visualization and Computer Graphics 17.1 (2010): 101-114.

Examples

# the algorithm has problems with parallel edges
library(igraph)
g <- simplify(metro_berlin)
xy <- cbind(V(g)$lon, V(g)$lat) * 100

# the algorithm is not very stable. try playing with the parameters
xy_new <- layout_as_metromap(g, xy, l = 2, gr = 0.5, w = c(100, 100, 1, 1, 100), bsize = 35)

[Package graphlayouts version 1.1.1 Index]