set_vertex_color
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.
set_edge_color
assigns a color to each edge (the same as the vertex
membership colors). Edges that connect vertices of two different groups are
colored gray.
set_vertex_color(g, name, memb)set_edge_color(g, name, memb)
An igraph
graph object
Character string of the name of the vertex attribute to add
An integer vector representing membership of e.g. a community
The same graph with additional vertex or edge attribute