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