View source: R/scale-constants.R
| scale_edge_widths | R Documentation |
Unified edge width scaling function that supports multiple scaling modes and output range specification.
scale_edge_widths(
weights,
esize = NULL,
n_nodes = NULL,
directed = FALSE,
mode = "linear",
maximum = NULL,
minimum = 0,
cut = NULL,
range = c(0.5, 4),
visual_scale = NULL
)
weights |
Numeric vector of edge weights. |
esize |
Maximum edge size. If NULL, |
n_nodes |
Number of nodes. Accepted for caller compatibility; not used by this scaler. |
directed |
Whether network is directed. Accepted for caller compatibility; not used by this scaler. |
mode |
Scaling mode: "linear", "log", "sqrt", or "rank". |
maximum |
Max weight for normalization. NULL for auto-detect. |
minimum |
Min weight threshold. Edges below this get minimum width. |
cut |
Accepted for caller compatibility. Width scaling is continuous in the current implementation; cutoff handling is performed by callers for other aesthetics such as transparency. |
range |
Output width range as c(min_width, max_width). |
linear (default): Direct proportional scaling, matches qgraph behavior.
log: Logarithmic scaling for wide weight ranges. Uses log1p for stability.
sqrt: Square root scaling for moderate compression.
rank: Rank-based scaling for equal visual spacing regardless of weight distribution.
Numeric vector of scaled edge widths.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.