set_color_multilevel: Set colors for levels of a multilevel network

Description Usage Arguments Value Author(s) Examples

View source: R/set_color_multilevel.R

Description

Set vertices and edges colors for a multilevel network. Default set to blue (higher level) and red (lower level).

Usage

1
2
set_color_multilevel(x, color.true = "blue", color.false = "red",
  V.alpha = 0.7, E.alpha = 0.7)

Arguments

x

a graph object. Must be a multilevel network.

color.true

a character. The color to be chosen for the higher level (attribute type set to TRUE).

color.false

a character. The color to be chosen for the lower level (attribute type set to FALSE).

V.alpha

numeric. The factor modifying the opacity alpha for the vertices; typically in [0,1].

E.alpha

numeric. The factor modifying the opacity alpha for the edges; typically in [0,1].

Value

A graph object. A multilevel network with an added color vertex attribute vector and a color edge attribute vector.

Author(s)

Neylson Crepalde, neylsoncrepalde@gmail.com

Examples

1
2
3
4
5
# Check whether a graph is multilevel
is_multilevel(linked_sim)

# Set the colors for each level
linked_sim <- set_color_multilevel(linked_sim)

neylsoncrepalde/multinets documentation built on Dec. 17, 2019, 11:46 p.m.