Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# plot the communities
color_map = []
for node in G:
if node in node_groups[0]:
color_map.append('blue')
else:
color_map.append('green')
nx.draw(G, node_color=color_map, with_labels=True)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment