igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] igraph slow when plotting


From: Gábor Csárdi
Subject: Re: [igraph] igraph slow when plotting
Date: Fri, 28 Feb 2014 07:04:38 -0500

Hi Simone,

> library(igraph)
> g<-graph.empty(n=0, directed=T)
> # add nodes
> g<-add.vertices(g, length(df[,1]), attr=df)
Error in add.vertices(g, length(df[, 1]), attr = df) : 
  please supply names for attributes

please send reproducible code, and information about your platform.

Vertices are indeed plotted one by one if they have different shapes.

Gabor


On Fri, Feb 28, 2014 at 6:29 AM, Simone Gabbriellini <address@hidden> wrote:
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
_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help


reply via email to

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