powered by
Modify the edge colors of a sgraph object by providing a single color. Also works with a vector of correct size.
add_edge_color( sigma_obj, one_color = NULL, color_attr = NULL, color_palette = "Set2" )
sgraph with modified edge colors
sgraph object
A single color to color all of the nodes (hex format)
The name of an edge attribute
Name of RColorBrewer palette to use
library(igraph) library(sgraph) data(lesMis) sig <- sigma_from_igraph(igraph = lesMis) %>% add_edge_color(one_color = "#ccc") sig
Run the code above in your browser using DataLab