| gplot {sna} | R Documentation |
gplot produces a simple two-dimensional plot of graph g in stack dat. A variety of options are available to control vertex placement, display details, color, etc.
gplot(dat, g=1, gmode="digraph", diag=FALSE, label=c(1:dim(dat)[2]),
coord=NULL, jitter=TRUE, thresh=0, usearrows=TRUE, mode="mds",
displayisolates=TRUE, pad=0, vertex.pch = 19, label.cex=1,
vertex.cex=1, label.col=1, edge.col=1, vertex.col=1,
arrowhead.length=0.2, edge.type=1, edge.lwd = 0, ...)
dat |
A graph or graph stack. This data may be valued. |
g |
Integer indicating the index of the graph which is to be plotted. By default, g==1. |
gmode |
String indicating the type of graph being evaluated. "digraph" indicates that edges should be interpreted as directed; "graph" indicates that edges are undirected; "twomode" indicates that data should be interpreted as bimodal (i.e., rows and columns are distinct vertex sets). gmode is set to "digraph" by default. |
diag |
Boolean indicating whether or not the diagonal should be treated as valid data. Set this true if and only if the data can contain loops. diag is FALSE by default. |
label |
A vector of vertex labels, if desired; defaults to the vertex index number. |
coord |
User-specified vertex coordinates, in an nx2 matrix. Where this is specified, it will override the mode setting. |
jitter |
Should the output be jittered? |
thresh |
Real number indicating the lower threshold for tie values. Only ties of value >thresh are displayed. By default, thresh=0. |
usearrows |
Should arrows (rather than line segments) be used to indicate edges? |
mode |
The vertex placement algorithm. This must be one of "princoord", "eigen", "mds", "random", "circle", "circrand", "rmds", "geodist", "adj", or "seham". |
displayisolates |
Should we display isolates? |
pad |
Amount to pad the plotting range; useful if labels are being clipped |
vertex.pch |
Character type for vertices; may be given as a vector, if vertices are to be of different types |
label.cex |
Character expansion factor for label text |
vertex.cex |
Character expansion factor for vertices |
label.col |
A vector of colors for labels |
edge.col |
A vector of colors for edges |
vertex.col |
A vector of colors for vertices |
arrowhead.length |
If arrows are used for edges, how long should the arrowhead be? |
edge.type |
Line type for edges |
edge.lwd |
Line width scale for edges; if set greater than 0, edge widths are given by edge.lwd*dat |
... |
Additional arguments to plot |
gplot is the standard network visualization tool within the sna library. By means of clever selection of display parameters, a fair amount of display flexibility can be obtained.
None.
mva
Carter T. Butts ctb@andrew.cmu.edu
Wasserman, S., and Faust, K. (1994). ``Social Network Analysis: Methods and Applications.'' Cambridge: Cambridge University Press.
gplot(rgraph(5)) #Plot a random graph