alis.network_tools.plots.draw_communities
alis.network_tools.plots.draw_communities#
- alis.network_tools.plots.draw_communities(G, membership, pos)[source]#
Draws the nodes to a plot with assigned colors for each individual cluster
- Parameters
- Gnetworkx graph
- membershiplist
A list where the position is the student and the value at the position is the student club membership. E.g. print(membership[8]) –> 1 means that student #8 is a member of club 1.
- pospositioning as a networkx spring layout
E.g. nx.spring_layout(G)
- Returns
- Network with assigned colors for each community