gplot
visualization routine.
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.fruchtermanreingold(d, layout.par)
gplot.layout.geodist(d, layout.par)
gplot.layout.hall(d, layout.par)
gplot.layout.kamadakawai(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)
gplot.layout.target(d, layout.par)
gplot
. d
.
gplot
allows for the use of arbitrary vertex layout algorithms via the gplot.layout.*
family of routines. When called, gplot
searches for a gplot.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 gplot.layout
function are as follows:
d
, must be the (dichotomous) graph adjacency matrix;
layout.par
, must be a list of parameters (or NULL
, if no parameters are specified); and
c(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:
"symupper"
, "symlower"
, "symstrong"
, "symweak"
invoke symmetrize
on d
with the respective symmetrizing rule. "user"
indicates a user-supplied matrix (see below), while "raw"
indicates that d
should be used as-is. (Defaults to "raw"
.)
"first"
, the first two eigenvectors are used; if "size"
, the two eigenvectors whose eigenvalues have the largest magnitude are used instead. Note that only the real portion of the associated eigenvectors is used. (Defaults to "first"
.)
layout.par\$var=="user"
, this matrix is used for the eigenanalysis. (No default.)
n
.)
n^2
.)
area*log(n)
.)
ncell
by ncell
cells, which are used to define neighborhoods for force calculation. Moderate numbers of cells result in fastest performance; too few cells (down to 1, which produces pure F-R results) can yield odd layouts, while too many will result in long layout times. (Defaults to n^0.4
.)
0.5
.)
0
.)
18
.)
ncell^2
.)
NROW(d)/4
.)
NROW(d)^2
.)
d
after symmetrizing, capped at sqrt(NROW(d))
.)
"rowcol"
, "row"
, and "col"
indicate that the rows and columns (concatenated), rows, or columns (respectively) of d
should be used. "rcsum"
and "rcdiff"
result in the sum or difference of d
and its transpose being employed. "invadj"
indicates that max{d}-d
should be used, while "geodist"
uses geodist
to generate a matrix of geodesic distances from d
. Alternately, an arbitrary matrix can be provided using "user"
. (Defaults to "rowcol"
.)
method
parameters to dist
("euclidean"
, "maximum"
, "manhattan"
, or "canberra"
), or else "none"
. In the latter case, no distance function is calculated, and the matrix in question must be square (with dimension dim(d)
) for the routine to work properly. (Defaults to "euclidean"
.)
layout.par\$var=="user"
, this matrix is used for the distance calculation. (No default.)
Note: the following layout functions are based on mds
:
"invadj"
).
d
.
d
(i.e., another approximate structural equivalence scaling).
"rowcol"
, "col"
, and "row"
indicate that the rows/cols, columns, or rows (respectively) of d
should be employed. "rcsum"
"rcdiff"
result in the sum or difference of d
and t(d)
being used. "user"
allows for an arbitrary variable matrix to be supplied. (Defaults to "rowcol"
.)
TRUE
.)
layout.par\$var=="user"
, this matrix is used for the correlation/covariance calculation. (No default.)
"unif"
(for uniform distribution on the square), "uniang"
(for a ``gaussian donut'' configuration), and "normal"
(for a straight Gaussian distribution). (Defaults to "unif"
.)
Note: circrand
, which is a frontend to the "uniang"
option, is based on this function.
0.1
.)
1
.)
0.001
.)
0.1
.)
0.01
.)
FALSE
.)
Note: springrepulse
is a frontend to spring
, with repulsion turned on.
gplot.target
.) It takes the following arguments:
NROW(d)
containing vertex radii. Ideally, these should lie in the [0,1] interval (and odd behavior may otherwise result). (Defaults to the affine-transformed Freeman degree
centrality scores of d
.)
pi
.)
FALSE
.)
periph.outside==TRUE
. (Defaults to 1.2.)
Fruchterman, T.M.J. and Reingold, E.M. (1991). ``Graph Drawing by Force-directed Placement.'' Software - Practice and Experience, 21(11):1129-1164.
Kamada, T. and Kawai, S. (1989). ``An Algorithm for Drawing General Undirected Graphs.'' Information Processing Letters, 31(1):7-15.
gplot
, gplot.target
, gplot3d.layout
, cmdscale
, eigen