gplot3d                 package:sna                 R Documentation

_T_h_r_e_e-_D_i_m_e_n_s_i_o_n_a_l _V_i_s_u_a_l_i_z_a_t_i_o_n _o_f _G_r_a_p_h_s

_D_e_s_c_r_i_p_t_i_o_n:

     'gplot3d' produces a three-dimensional plot of graph 'g' in set
     'dat'.  A variety of options are available to control vertex
     placement, display details, color, etc.

_U_s_a_g_e:

     gplot3d(dat, g = 1, gmode = "digraph", diag = FALSE, 
         label = c(1:dim(dat)[2]), coord = NULL, jitter = TRUE, thresh = 0,
         mode = "fruchtermanreingold", displayisolates = TRUE, displaylabels = FALSE,
         xlab = NULL, ylab = NULL, zlab = NULL, vertex.radius = NULL, 
         absolute.radius = FALSE, label.col = "gray50", edge.col = "black",
         vertex.col = "red", edge.alpha = 1, vertex.alpha = 1, 
         edge.lwd = NULL, suppress.axes = TRUE, new = TRUE, 
         bg.col = "white", layout.par = NULL)

_A_r_g_u_m_e_n_t_s:

     dat: a graph or set thereof.  This data may be valued. 

       g: integer indicating the index of the graph (from 'dat') which
          is to be displayed. 

   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 two-mode (i.e., rows and columns are distinct
          vertex sets). 

    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.  

   label: a vector of vertex labels; setting this to a zero-length
          string (e.g., '""') omits 

   coord: user-specified vertex coordinates, in an 'NCOL(dat)'x3
          matrix.  Where this is specified, it will override the 'mode'
          setting. 

  jitter: boolean; should vertex positions be jittered? 

  thresh: real number indicating the lower threshold for tie values. 
          Only ties of value >'thresh' are displayed.  

    mode: the vertex placement algorithm; this must correspond to a
          'gplot3d.layout' function. 

displayisolates: boolean; should isolates be displayed? 

displaylabels: boolean; should vertex labels be displayed? 

    xlab: X axis label. 

    ylab: Y axis label. 

    zlab: Z axis label. 

vertex.radius: vertex radius, relative to the baseline (which is set
          based on layout features); may be given as a vector, if radii
          vary across vertices. 

absolute.radius: vertex radius, specified in absolute terms; this may
          be given as a vector. 

label.col: color for vertex labels; may be given as a vector, if labels
          are to be of different colors. 

edge.col: color for edges; may be given as a vector or adjacency
          matrix, if edges are to be of different colors. 

vertex.col: color for vertices; may be given as a vector, if vertices
          are to be of different colors. 

edge.alpha: alpha (transparency) values for edges; may be given as a
          vector or adjacency matrix, if edge transparency is to vary. 

vertex.alpha: alpha (transparency) values for vertices; may be given as
          a vector, if vertex transparency is to vary. 

edge.lwd: line width scale for edges; if set greater than 0, edge
          widths are rescaled by 'edge.lwd*dat'.  May be given as a
          vector or adjacency matrix, if edges are to have different
          line widths. 

suppress.axes: boolean; suppress plotting of axes? 

     new: boolean; create a new plot?  If 'new==FALSE', the RGL device
          will not be cleared prior to adding vertices and edges. 

  bg.col: background color for display. 

layout.par: list of parameters to the 'gplot.layout' function specified
          in 'mode'. 

_D_e_t_a_i_l_s:

     'gplot3d' is the three-dimensional companion to 'gplot'.  As with
     the latter, clever manipulation of parameters can allow for a
     great deal of flexibility in the resulting display.  (Displays
     produced by 'gplot3d' are also interactive, to the extent
     supported by 'rgl'.)  If vertex positions are not specified
     directly using 'coord', vertex layout is determined via one of the
     various available algorithms.  These should be specified via the
     'mode' argument; see 'gplot3d.layout' for a full list. 
     User-supplied layout functions are also possible - see the
     aforementioned man page for details.

     Note that where 'gmode=="twomode"', the supplied two-mode matrix
     is converted to bipartite adjacency form prior to computing
     coordinates.  It may be desirable to use parameters such as
     'vertex.col' to differentiate row and column vertices.

_V_a_l_u_e:

     A three-column matrix containing vertex coordinates

_R_e_q_u_i_r_e_s:

     'rgl'

_A_u_t_h_o_r(_s):

     Carter T. Butts buttsc@uci.edu

_R_e_f_e_r_e_n_c_e_s:

     Wasserman, S. and Faust, K.  (1994)  _Social Network Analysis:
     Methods and Applications._  Cambridge: Cambridge University Press.

_S_e_e _A_l_s_o:

     'gplot', 'gplot3d.layout', 'rgl'

_E_x_a_m_p_l_e_s:

     ## Not run: 
     #A three-dimensional grid...
     gplot3d(rgws(1,5,3,1,0))

     #...rewired...
     gplot3d(rgws(1,5,3,1,0.05))

     #...some more!
     gplot3d(rgws(1,5,3,1,0.2))
     ## End(Not run)

