edge_bundle_force {edgebundle} | R Documentation |
force directed edge bundling
Description
Implements the classic edge bundling by Holten.
Usage
edge_bundle_force(
object,
xy,
K = 1,
C = 6,
P = 1,
S = 0.04,
P_rate = 2,
I = 50,
I_rate = 2/3,
compatibility_threshold = 0.6,
eps = 1e-08
)
Arguments
object |
a graph object (igraph/network/tbl_graph) |
xy |
coordinates of vertices |
K |
spring constant |
C |
number of iteration cycles |
P |
number of initial edge divisions |
S |
initial step size |
P_rate |
rate of edge divisions |
I |
number of initial iterations |
I_rate |
rate of iteration decrease per cycle |
compatibility_threshold |
threshold for when edges are considered compatible |
eps |
accuracy |
Details
This is a re-implementation of https://github.com/upphiminn/d3.ForceBundle. Force directed edge bundling is slow (O(E^2)).
see online for plotting tips
Value
data.frame containing the bundled edges
Author(s)
David Schoch
References
Holten, Danny, and Jarke J. Van Wijk. "Force-Directed Edge Bundling for Graph Visualization." Computer Graphics Forum (Blackwell Publishing Ltd) 28, no. 3 (2009): 983-990.
See Also
edge_bundle_hammer,edge_bundle_stub,edge_bundle_path
Examples
library(igraph)
g <- graph_from_edgelist(
matrix(c(
1, 12, 2, 11, 3, 10,
4, 9, 5, 8, 6, 7
), ncol = 2, byrow = TRUE), FALSE
)
xy <- cbind(c(rep(0, 6), rep(1, 6)), c(1:6, 1:6))
edge_bundle_force(g, xy)