Gplot {simone} | R Documentation |
This function plots a graph representation from its adjacency matrix using when available a classification vector describing a partition of the nodes. .
Gplot(A, cl = NULL, ...)
A |
graph adjacency matrix. |
cl |
node classification vector. Default NULL .
|
... |
Additional optional arguments are available, see details. |
This graph-drawing function is based on C
routines
extracted from the sna
package and reorganized to adapt its
possibilities in our framework (graphs are undirected, weighted and
with no self-loops).
Edges are coloured by sign (red for negative, blue for positive). Edge widths are proportional to absolute edge weight, the maximal width being set to 5. Weak edges are dotted rather than solid. The function returns the coordinates of the nodes which can be later passed back to Gplot.
Additional arguments are :
coord
NULL
.
labels
NULL
.
main
, sub
plot
arguments. Defaults NULL
.
degree.threshold
.Machine$double.xmin
.
display.isolate
TRUE
.
cols
max.edges
10000
.
A matrix of node coordinates is returned, along with a graph plot.
G. Grasseau, A. Smith and J. Chiquet
library(simone) ## Graph generation p <- 100 n <- 1 proba.in <- 0.15 proba.out <- 0.005 alpha <- c(.5,.3,.2) X <- SimDataAffiliation (p, n, proba.in, proba.out, alpha) ## Graphical representation g <- Gplot(X$K.theo, X$cl.theo, main = "A tri-modular graph")