Hi all, I'm doing some experiments with igraph and in particular with graph layouts. I can't figure out how to apply a layout to a given (real) graph avoiding node overlaps.
In the following example if the variable NumOfNodes is setted to a small value (10) the
layout function generates a plot without node overlaps. But even with a not-so-big number of nodes (50) plotted graph has almost all nodes overlapped by neighbors vertices.
# R code require(igraph)
NumOfNodes <- 10
g <- barabasi.game(NumOfNodes) g$layout <- layout.reingold.tilford(g) plot(g)
NumOfNodes <- 50
g <- barabasi.game(NumOfNodes) g$layout <- layout.reingold.tilford(g) plot(g)
The problem gets even worst if I increase vertex size.
# R code require(igraph)
NumOfNodes <- 10
g <- barabasi.game(NumOfNodes) g$size <- 1:NumOfNodes for(vv in 1:NumOfNodes)
{ g$size[vv] <- 40 # defualt values should be 15 }
g$layout <- layout.reingold.tilford(g) plot(g)
I'm using GraphViz at the moment, which has an option to avoid overlaps but I can't find something similar in igraph documentation.
Can someone point me to the rigth direction ? Thank you in advance.