igraph-help
[Top][All Lists]
Advanced

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

[igraph] igraph slow when plotting


From: Simone Gabbriellini
Subject: [igraph] igraph slow when plotting
Date: Fri, 28 Feb 2014 12:29:28 +0100

Dear List,

I have observed a strange behavior in igraph with R. If I do:

g<-graph.empty(n=0, directed=T) 
# add nodes
g<-add.vertices(g, length(df[,1]), attr=df)
# plot
plot(g, vertex.size=3, vertex.label.cex=0.7, vertex.label.dist=0.3)

it’s fast as usual, but if I do:

g<-graph.empty(n=0, directed=T) 
# add nodes
g<-add.vertices(g, length(df[,1]), attr=df)
# shape visualization, if type = city -> squared, else circle
V(g)[type=="city"]$shape<-"square"
V(g)[type=="potter"]$shape<-"circle"
# plot
plot(g, vertex.size=3, vertex.label.cex=0.7, vertex.label.dist=0.3)

then it looks like it plots vertices one by one… and it takes considerably more 
time… any guess where I am wrong?

best,
Simone


reply via email to

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