Learn R Programming

sna (version 0.4)

gplot.layout: Vertex Layout Functions for gplot

Description

Various functions which generate vertex layouts for the gplot visualization routine.

Usage

gplot.layout.adj(d, layout.par)
gplot.layout.circle(d, layout.par)
gplot.layout.circrand(d, layout.par)
gplot.layout.eigen(d, layout.par)
gplot.layout.geodist(d, layout.par)
gplot.layout.mds(d, layout.par)
gplot.layout.princoord(d, layout.par)
gplot.layout.random(d, layout.par)
gplot.layout.rmds(d, layout.par)
gplot.layout.segeo(d, layout.par)
gplot.layout.seham(d, layout.par)
gplot.layout.spring(d, layout.par)
gplot.layout.springrepulse(d, layout.par)

Arguments

d
an adjacency matrix, as passed by gplot.
layout.par
a list of parameters.

Value

  • A matrix whose rows contain the x,y coordinates of the vertices of d.

Details

Vertex layouts for network visualization pose a difficult problem -- there is no single, ``good'' layout algorithm, and many different approaches may be valuable under different circumstances. With this in mind, gplot allows for the use of arbitrary vertex layout algorithms via the gplot.layout.* family of routines. When called, gplot searches for a graph.layout function whose third name matches its mode argument (see gplot help for more information); this function is then used to generate the layout for the resulting plot. In addition to the routines documented here, users may add their own layout functions as needed. The requirements for a graph.layout function are as follows:
  1. the first argument,d, must be the (dichotomous) graph adjacency matrix;
  2. the second argument,layout.par, must be a list of parameters (orNULL, if no parameters are specified); and
  3. the return value must be a real matrix of dimensionc(2,NROW(d)), whose rows contain the vertex coordinates.
Other than this, anything goes. (In particular, note that layout.par could be used to pass additional matrices, if needed.) The graph.layout functions currently supplied by default are as follows: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

See Also

gplot, cmdscale, eigen