Description Usage Arguments Value Examples
Scale color by node size.
1 | sg_scale_color(sg, pal)
|
sg |
An object of class |
pal |
Vector of color. |
A modified version of the sg
object.
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"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.