[Top][All Lists]

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

Re: [igraph] timestep plotting

From: Gabor Csardi
Subject: Re: [igraph] timestep plotting
Date: Mon, 8 Jan 2007 16:54:50 +0100
User-agent: Mutt/1.5.11

On Mon, Jan 08, 2007 at 10:35:45AM -0500, Vincent Matossian wrote:
> Hi Gabor,
> thanks a lot, I hadn't thought of doing it this way at all, it's a neat idea!
> :)
> when you say that with the current code it could be made more simple, do you
> mean using iterators over the set of nodes+edges and using color attributes at
> every step to add (instead of deleting all irrelevant) the newly added nodes
> and edges?

Yes, something like that. First we set the color of each edge and vertex to
white and then in each time step we set the color of the current vertex and
all edges going to already existing vertices from it to non-white:

V(g)$color <- "white"
E(g)$color <- "white"


for (i in seq(vcount(g))-1) {
  V(g)[i]$color <- "blue"
  E(g)[ i %--% 0:(i-1) ]$color <- "black"


Etc. This is also good for the general case but we would need to know in
which time step an edge and a vertex is added. This is what the igraph graph
generators do not provide unfortunately. Not yet. :)


> I really like the effect of this visualization, thanks again!
> Vincent

Csardi Gabor <address@hidden>    MTA RMKI, ELTE TTK

reply via email to

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