Description Usage Arguments Details Value Examples
Modify the edge colors of a 'sigmaNet' object by providing either: (1) a single color to use for every edge; or (2) an attribute of the initial 'igraph' object that will be used to determine color.
1 2 | addEdgeColors(sigmaObj, oneColor = NULL, colorAttr = NULL,
colorPal = "Set2")
|
sigmaObj |
A 'sigmaNet' object - created using the 'sigmaFromIgraph' function |
oneColor |
A single color to color all of the nodes (hex format) |
colorAttr |
An attribute from the original 'igraph' nodes to color the nodes by |
colorPal |
The color palatte to use - only used if colorAttr is specified |
If the 2nd option is used, you can also specify a color palette from 'RColorBrewer.'
A 'sigmaNet' object with modified node labels. This object can be called directly to create a visualization, or modified by additional functions.
1 2 3 4 5 6 7 8 9 10 11 12 | library(igraph)
library(sigmaNet)
library(magrittr)
data(lesMis)
l <- layout_nicely(lesMis)
#one color for all edges
sig <- sigmaFromIgraph(graph = lesMis, layout = l) %>%
addEdgeColors(oneColor = '#D95F02')
sig
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.