set_graph_colors
takes an integer vector representing membership of
some grouping (e.g., a community or connected component) and creates a
character vector of colors for each grouping. Isolated vertices will be
colored gray. Edges are assigned the same color if connected to
vertices in the same group, and assigned gray otherwise.
set_graph_colors(g, name, memb)
The same graph with additional vertex and edge attributes
An igraph
graph object
Character string of the name of the attribute to add
An integer vector representing membership of e.g. a community