View source: R/scale-constants.R
| compute_adaptive_esize | R Documentation |
Calculates the maximum edge width that decreases with more nodes. Inspired by qgraph but scaled for line widths (not pixels).
compute_adaptive_esize(n_nodes, directed = FALSE)
n_nodes |
Number of nodes in the network. |
directed |
Whether the network is directed (directed networks use thinner edges). |
The formula produces reasonable line widths:
3 nodes: ~5
10 nodes: ~4.5
50 nodes: ~3
100 nodes: ~2
200 nodes: ~1.2
For directed networks, the size is reduced by 30% (minimum 1).
Numeric maximum edge width (suitable for lwd parameter).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.