ggflows {isotracer} | R Documentation |
A quick-and-dirty way of visualizing relative flows in a network
Description
A quick-and-dirty way of visualizing relative flows in a network
Usage
ggflows(x, layout = "auto", edge = "fan", max_width, legend = TRUE, ...)
Arguments
x |
A tibble with the flow estimates, with columns "from", "to", and "flow". |
layout |
Optional, layout to use (e.g. "sugiyama", "kk", "stress") |
edge |
"curve" (the default), "line" or "fan". |
max_width |
Optional, numeric giving the maximum edge width (minimum width is always 1). |
legend |
Boolean, display edge width legend? |
... |
Not used. |
Value
A ggplot2 plot.
Examples
if (requireNamespace("ggraph")) {
z <- tibble::tribble(
~from, ~to, ~flow,
"leavesAndStem", "rootsAndRhizome", 333.929866077124,
"lowerWater", "rootsAndRhizome", 4425.15780019304,
"rootsAndRhizome", "leavesAndStem", 525.208837577916,
"upperWater", "leavesAndStem", 11224.0814971855
)
ggflows(z)
ggflows(z, max_width = 15)
}
[Package isotracer version 1.1.6 Index]