igraph-help
[Top][All Lists]
Advanced

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

[igraph] Trees generations?


From: Marco
Subject: [igraph] Trees generations?
Date: Mon, 9 Nov 2009 12:37:14 +0100

Hi,

I generate a tree (using igraph+python):

graph=igraph.Graph.Tree(size,br)

By using an appropriate 'size' I can create a tree in which each
branch has the same number of generations and each generation has the
same number of nodes, no one's missing anything. :)
I can do this using size = \sum_i br^i for each i being a generation, I think.

The question is: if I plot the graph is there an "easy" way to color
the different generations' node?
For example: one color for the root node. One other color for the
nodes connected to the root node. One other color for those connected
to one of those that are connected to the root node, and so on.
Of course I can write some code that does exactly this, but maybe
there's an easiest way and I am just reinventing the wheel....

Thank you in advance,

marco

--
restituiremo il riso ai salici




reply via email to

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