Community plot with schedule

I want to create a graph of a graph with each community of nodes that have been covered with some background color, similar to the graph by the following code

karate <- graph.famous("Zachary")
wc <- walktrap.community(karate)
modularity(wc)
membership(wc)
plot(wc, karate)

      

But, different from this approach, I want to: (1) group nodes myself, not as a result of a community discovery algorithm. I have achieved this wc$membership <- some_vector

; (2) a graph of such a graph, possibly with overlap between communities, then how can I assign one node to multiple communities?

+3


source to share


1 answer


Plot the graph directly instead of the community structure and use the appropriate argument mark.groups

for plot()

to tell igraph which groups should be included by the same group. The following quote is from the man page plot.igraph

:



mark.groups : list of vertex identifiers. It is interpreted as a collection of vertex groups. Each group of vertices is highlighted by drawing a colored anti-aliased polygon and "under it".

+3


source







All Articles