Learn R Programming

sna (version 2.8)

gdist.plotstats: Plot Various Graph Statistics Over a Network MDS

Description

Plots a two-dimensional metric MDS of d, with the corresponding values of meas indicated at each point. Various options are available for controlling how meas is to be displayed.

Usage

gdist.plotstats(d, meas, siz.lim=c(0, 0.15), rescale="quantile", 
    display.scale="radius", display.type="circleray", cex=0.5, pch=1,
    labels=NULL, pos=1, labels.cex=1, legend=NULL, legend.xy=NULL, 
    legend.cex=1, ...)

Value

None

Arguments

d

A matrix containing the inter-graph distances

meas

An nxm matrix containing the graph-level measures; each row must correspond to a graph, and each column must correspond to an index

siz.lim

The minimum and maximum sizes (respectively) of the plotted symbols, given as fractions of the total plotting range

rescale

One of ``quantile'' for ordinal scaling, ``affine'' for max-min scaling, and ``normalize'' for rescaling by maximum value; these determine the scaling rule to be used in sizing the plotting symbols

display.scale

One of ``area'' or ``radius''; this controls the attribute of the plotting symbol which is rescaled by the value of meas

display.type

One of ``circle'', ``ray'', ``circleray'', ``poly'', or ``polyray''; this determines the type of plotting symbol used (circles, rays, polygons, or come combination of these)

cex

Character expansion coefficient

pch

Point types for the base plotting symbol (not the expanded symbols which are used to indicate meas values)

labels

Point labels, if desired

pos

Relative position of labels (see par)

labels.cex

Character expansion factor for labels

legend

Add a legend?

legend.xy

x,y coordinates for legend

legend.cex

Character expansion factor for legend

...

Additional arguments to plot

Author

Carter T. Butts buttsc@uci.edu

Details

gdist.plotstats works by performing an MDS (using cmdscale) on d, and then using the values in meas to determine the shape of the points at each MDS coordinate. Typically, these shapes involve rays of varying color and length indicating meas magnitude, with circles and polygons of the appropriate radius and/or error being options as well. Various options are available (described above) to govern the details of the data display; some tinkering may be needed in order to produce an aesthetically pleasing visualization.

The primary use of gdist.plotstats is to explore broad relationships between graph properties and inter-graph distances. This routine complements others in the gdist and gclust family of interstructural visualization tools.

References

Butts, C.T., and Carley, K.M. (2001). ``Multivariate Methods for Interstructural Analysis.'' CASOS working paper, Carnegie Mellon University.

See Also

gdist.plotdiff, gclust.boxstats, gclust.centralgraph

Examples

Run this code
#Generate random graphs with varying density
g<-rgraph(10,20,tprob=runif(20,0,1))

#Get Hamming distances between graphs
g.h<-hdist(g)

#Plot the association of distance, density, and reciprocity
gdist.plotstats(g.h,cbind(gden(g),grecip(g)))

Run the code above in your browser using DataLab