igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] layout and node overlaps


From: Angelo Felline
Subject: [igraph] layout and node overlaps
Date: Sun, 12 Sep 2010 21:21:52 +0200

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.

a

reply via email to

[Prev in Thread] Current Thread [Next in Thread]