set_graph_colors: Color graph vertices and edges

View source: R/set_brainGraph_attributes.R

set_graph_colorsR Documentation

Color graph vertices and edges

Description

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.

Usage

set_graph_colors(g, name, memb)

Arguments

g

An igraph graph object

name

Character string of the name of the attribute to add

memb

An integer vector representing membership of e.g. a community

Value

The same graph with additional vertex and edge attributes


brainGraph documentation built on June 22, 2024, 7:36 p.m.