Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

color-scale

Color


Description

Scale color by node size.

Usage

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

nodes <- sg_make_nodes() 
edges <- sg_make_edges(nodes, 20)

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

sigmajs

Interface to 'Sigma.js' Graph Visualization Library

v0.1.5
MIT + file LICENSE
Authors
John Coene [aut, cre, cph] (<https://orcid.org/0000-0002-6637-4107>)
Initial release
2020-06-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.