edge_bundle_stub | R Documentation |
Implements the stub edge bundling by Nocaj and Brandes
edge_bundle_stub(
object,
xy,
alpha = 11,
beta = 75,
gamma = 40,
t = 0.5,
tshift = 0.5
)
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 |
see online for plotting tips
data.frame containing the bundled edges
David Schoch
Nocaj, Arlind, and Ulrik Brandes. "Stub bundling and confluent spirals for geographic networks." International Symposium on Graph Drawing. Springer, Cham, 2013.
edge_bundle_hammer,edge_bundle_force, edge_bundle_path
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.