add_edge_color {sgraph} | R Documentation |
Modify the edge colors of a sgraph object.
Description
Modify the edge colors of a sgraph object by providing a single color. Also works with a vector of correct size.
Usage
add_edge_color(
sigma_obj,
one_color = NULL,
color_attr = NULL,
color_palette = "Set2"
)
Arguments
sigma_obj |
sgraph object |
one_color |
A single color to color all of the nodes (hex format) |
color_attr |
The name of an edge attribute |
color_palette |
Name of RColorBrewer palette to use |
Value
sgraph with modified edge colors
Examples
library(igraph)
library(sgraph)
data(lesMis)
sig <- sigma_from_igraph(igraph = lesMis) %>%
add_edge_color(one_color = "#ccc")
sig
[Package sgraph version 1.0.0 Index]