Reputation: 3285
Is it possible to exclude or edit the modules being plotted so that modules with only one node do not have a module boundary? In case below, hide the module boundary around 9 and 13.
set.seed(3)
g <- barabasi.game(20, m=2, directed=FALSE)
eb <- cluster_edge_betweenness(g)
plot(eb, g, layout=layout_with_fr)
Upvotes: 1
Views: 364
Reputation: 37641
You can get at this using the mark.groups
argument to plot.communities
. First create the default grouping, but then eliminate the groups with only one member.
MG = lapply(unique(eb$membership), function(m) { which(eb$membership == m) })
MG[sapply(MG, length) == 1] = NULL
plot(eb, g, mark.groups=MG, layout=layout_with_fr)
Upvotes: 2