briatte / ggnet

Network visualization with ggplot2
https://briatte.github.io/ggnet/
194 stars 33 forks source link

node.group is not correct after setting subset.threshold #9

Closed qsz13 closed 9 years ago

qsz13 commented 9 years ago

Hi, after setting the subset.threshold, the group of the nodes seem not correct, here is the code I tested: n= network(35,directed=FALSE) type <- sample(1:2, 35, replace=T) names(type) <- seq(1,35) ggnet(n,node.group=type,label.nodes = TRUE,subset.threshold =0) ggnet(n,node.group=type,label.nodes = TRUE,subset.threshold =2)

the group is:

screen shot 2015-08-27 at 10 52 49 am

this is the result and the color of some nodes are not correct such as 8, 10, 18 :

screen shot 2015-08-27 at 10 51 18 am screen shot 2015-08-27 at 10 47 43 am
briatte commented 9 years ago

Yep, that's a bug.