stsm: Stress majorization layout

stsmR Documentation

Stress majorization layout

Description

A function to compute the graph coordinated system with a stress majorization layout algorithm

Usage

stsm(net, seed = seed, maxiter = 40, drp, jitter, method, ...)

Arguments

net

an array representing the network relations

seed

(mandatory) the seed of the initial layout (see details)

maxiter

(optional) the maximum number of iterations

drp

(optional) for valued networks, drop values less than specified

jitter

(optional) jitter in the layout

method

(optional) initial distance method (default binary)

...

Additional argument items

Details

This function is meant as an internal routine for graph visualization. However, it can be used with the coord option both in multigraph and in bmgraph where NULL in seed implies a random seed based on the clock watch of the computer.

Value

A data frame with a coordinated system with two columns representing the abscissa and the ordinate in a two-dimensional rectangular Cartesian coordinate system.

Author(s)

Antonio Rivero Ostoic

References

Gansner, E.R., Koren, Y., & North, S. Graph drawing by stress majorization. In Graph Drawing: 12th International Symposium, gd 2004, New York, NY, USA, September 29 - October 2, 2004, revised selected papers. Berlin Heidelberg: Springer. pp. 239-250. 2005.

See Also

multigraph, bmgraph, frcd, conc

Examples

## Create the data: two binary relations among three elements
arr <- round( replace( array(runif(18), c(3,3,2)), array(runif(18),
       c(3,3,2))>.5, 3 ) )

## Coordinates for the stress majorization layout with random start
coord <- stsm(arr, seed = NULL)

## Plot multigraph with customized coordinates
multigraph(arr, coord = coord)


mplex/multigraph documentation built on April 14, 2024, 12:15 p.m.