edge_bundle_stub {edgebundle} | R Documentation |
stub edge bundling
Description
Implements the stub edge bundling by Nocaj and Brandes
Usage
edge_bundle_stub(
object,
xy,
alpha = 11,
beta = 75,
gamma = 40,
t = 0.5,
tshift = 0.5
)
Arguments
object |
a graph object (igraph/tbl_graph). Does not support network objects |
xy |
coordinates of vertices |
alpha |
maximal angle (in degree) between consecutive edges in a bundle |
beta |
angle (in degree) at which to connect two stubs |
gamma |
maximal overall angle (in degree) of an edge bundle |
t |
numeric between 0 and 1. control point location |
tshift |
numeric between 0 and 1. The closer to one, the longer the bigger bundle |
Details
see online for plotting tips
Value
data.frame containing the bundled edges
Author(s)
David Schoch
References
Nocaj, Arlind, and Ulrik Brandes. "Stub bundling and confluent spirals for geographic networks." International Symposium on Graph Drawing. Springer, Cham, 2013.
See Also
edge_bundle_hammer,edge_bundle_force, edge_bundle_path
Examples
library(igraph)
g <- graph.star(10, "undirected")
xy <- matrix(c(
0, 0,
cos(90 * pi / 180), sin(90 * pi / 180),
cos(80 * pi / 180), sin(80 * pi / 180),
cos(70 * pi / 180), sin(70 * pi / 180),
cos(330 * pi / 180), sin(330 * pi / 180),
cos(320 * pi / 180), sin(320 * pi / 180),
cos(310 * pi / 180), sin(310 * pi / 180),
cos(210 * pi / 180), sin(210 * pi / 180),
cos(200 * pi / 180), sin(200 * pi / 180),
cos(190 * pi / 180), sin(190 * pi / 180)
), ncol = 2, byrow = TRUE)
edge_bundle_stub(g, xy)
# use ggforce::geom_bezier for plotting
[Package edgebundle version 0.4.2 Index]