Identify Vertex and/or Edge groups by colour.
plotNET_groupColour(
g,
groups = NULL,
colourV = TRUE,
alphaV = 1,
colourE = FALSE,
alphaE = 0.8,
groupColours = NULL,
defaultEdgeColour = "grey70",
doPlot = TRUE,
returnPlot = FALSE
)
An igraph object
A named numeric vector with length(V(g))
integers representing each group, or, a named character vector describing each group. If names(groups)==NULL
then the names of the vector will be set as names(groups) == V(g)$name
. If V(g)$name==NULL
, the names of the vector will be set by the Vertex index
Colour Vertices based on groups
(default = TRUE
)
Set transparency for Vertices (default = 1
)
Colour Edges based on groups
. Edges connecting to vertices of the same group will be coloured as the group (default = FALSE
)
Set transparency for Edges. A single numeric, or a vector of length ecount(g)
(default = 0.8
)
A list of length groups
with valid colour codes
Default edge colour
Plot the igraph object
return the ggplot2 object
An igraph object with vertices and/or edges coloured by groups listed in groups
Other tools for plotting networks:
plotNET_BA()
,
plotNET_SW()
,
plotNET_groupWeight()
,
plotNET_prep()