I found multiple postings (e.g. here and here) that illustrate how to modify a layout by adding an edge weight.
Still when I do
require(igraph)
g <- graph.ring(10)
plot(g)
set.seed(28100)
E(g)$weight <- sample(1:10, 10, replace = TRUE)
E(g)$weight
# [1] 4 3 4 6 2 9 5 2 9 7
l <- layout_with_fr(g, weights=E(g)$weight)
plot(g, layout=l)
with R version 3.2.2
and igraph version 1.0.1
I got the exact same layout. What instead I would expect to obtain is a layout where edges with a higher (lower) weight are shorter (longer). In other words, nodes connected by an edge with a higher weight are relative closer to each other than nodes connected by a low-weight edge.
Am I doing something wrong?