sg_relative_size: Relative node sizes

Description Usage Arguments Examples

View source: R/relative-size.R

Description

Change nodes size depending to their degree (number of relationships)

Usage

1
sg_relative_size(sg, initial = 1)

Arguments

sg

An object of class sigmajsas intatiated by sigmajs.

initial

Initial node size.

Examples

1
2
3
4
5
6
7
nodes <- sg_make_nodes(50)
edges <- sg_make_edges(nodes, 100)

sigmajs() %>%
  sg_nodes(nodes, id, label) %>% # no need to pass size
  sg_edges(edges, id, source, target) %>% 
  sg_relative_size()

JohnCoene/sigmajs documentation built on Nov. 21, 2018, 1:19 p.m.