color-scale: Color

Description Usage Arguments Value Examples

Description

Scale color by node size.

Usage

1
sg_scale_color(sg, pal)

Arguments

sg

An object of class sigmajsas intatiated by sigmajs.

pal

Vector of color.

Value

A modified version of the sg object.

Examples

1
2
3
4
5
6
nodes <- sg_make_nodes() 
edges <- sg_make_edges(nodes, 20)

sigmajs() %>% 
  sg_nodes(nodes, id, size) %>% 
  sg_scale_color(pal = c("red", "blue"))

sigmajs documentation built on July 8, 2020, 5:16 p.m.