powered by
Scale color by node size.
sg_scale_color(sg, pal)
An object of class sigmajsas intatiated by sigmajs.
sigmajs
Vector of color.
A modified version of the sg object.
sg
# NOT RUN { nodes <- sg_make_nodes() edges <- sg_make_edges(nodes, 20) sigmajs() %>% sg_nodes(nodes, id, size) %>% sg_scale_color(pal = c("red", "blue")) # }
Run the code above in your browser using DataLab