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)
Run the code above in your browser using DataLab