layout.community | R Documentation |
Create a network layout with community clusters
layout.community(graph, community, strength = 2, ...)
graph |
an igraph object |
community |
a vector with commmunity memberships |
strength |
the strength of attraction between community members |
a matrix with coordinates
data(den)
den.culture <- has.tags(den, "Culture", result = "den")
graph.culture <- elite.network(den.culture)
com <- membership(walktrap.community(graph.culture))
lay <- layout.community(graph.culture, com, 2, cloud.size = 1.5)
graph.plot(graph.culture, layout = lay, vertex.fill = as.factor(com)) + scale_fill_discrete(guide = "none")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.