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 sigmajs as instantiated 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"))

JohnCoene/sigmajs documentation built on Feb. 1, 2021, 12:12 p.m.