Open briatte opened 4 years ago
Seems to work out of the box:
library(igraph)
library(graphlayouts)
g <- sample_islands(9,20,0.4,9)
g <- simplify(g)
ggplot(ggnetwork(g, layout = graphlayouts::layout_with_stress(g))) +
geom_edges(aes(x=x,xend=xend,y=y,yend=yend)) +
geom_nodes(aes(x,y))
https://cran.r-project.org/package=graphlayouts