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.
gplot3d(dat, g = 1, gmode = "digraph", diag = FALSE, label = NULL, coord = NULL, jitter = TRUE, thresh = 0, mode = "fruchtermanreingold", displayisolates = TRUE, displaylabels = !missing(label), xlab = NULL, ylab = NULL, zlab = NULL, vertex.radius = NULL, absolute.radius = FALSE, label.col = "gray50", edge.col = "black", vertex.col = NULL, edge.alpha = 1, vertex.alpha = 1, edge.lwd = NULL, suppress.axes = TRUE, new = TRUE, bg.col = "white", layout.par = NULL)dat) which is to be displayed. "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). "") omits NCOL(dat)x3 matrix. Where this is specified, it will override the mode setting. thresh are displayed. gplot3d.layout function. gmode=="twomode").edge.lwd*dat. May be given as a vector or adjacency matrix, if edges are to have different line widths. new==FALSE, the RGL device will not be cleared prior to adding vertices and edges. gplot.layout function specified in mode. rglgplot3d 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 graph is converted to bipartite form prior to computing coordinates (assuming it is not in this form already). It may be desirable to use parameters such as vertex.col to differentiate row and column vertices; by default, row vertices are colored red, and column vertices blue.
gplot, gplot3d.layout, rgl
## 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)
Run the code above in your browser using DataLab