igraph-help
[Top][All Lists]
Advanced

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

[igraph] plot.igraph()


From: Diana Neufeld
Subject: [igraph] plot.igraph()
Date: Wed, 02 Sep 2009 10:31:24 +0200

Hello,

I have a question to the functions  plot.igraph() or tkplot() and 
graph.data.frame().

How can I get the y-axis in a graph with vertices depends on time? I have a 
data frame 
with two columns: publications and there references. And I need a third column 
with the year 
of publications. How can I use this time-information to get a graph, whose 
vertices are 
not randomly placed on a square.

example:
                
pub <- data.frame(name=c("PUB1","PUB2","PUB3","PUB4","PUB5"),
                  year=c(2002,1998,1993,2001,2005))

rel <- data.frame(from=c("PUB1","PUB2","PUB4","PUB5","PUB1"),
                    to=c("PUB2","PUB3","PUB3","PUB4","PUB4"))
g1 <- graph.data.frame(rel, directed=TRUE, vertices=pub)
print(g1, e=TRUE, v=TRUE)


Vertex attributes:
    name year
[0] PUB1 2002
[1] PUB2 1998
[2] PUB3 1993
[3] PUB4 2001
[4] PUB5 2005
Edges and their attributes:
                    
[0] 'PUB1' -> 'PUB2'
[1] 'PUB2' -> 'PUB3'
[2] 'PUB4' -> 'PUB3'
[3] 'PUB5' -> 'PUB4'
[4] 'PUB1' -> 'PUB4'



Thanks, Di.

________________________________________________________________
Neu: WEB.DE Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
für nur 19,99 Euro/mtl.!* http://produkte.web.de/go/02/





reply via email to

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