powered by
Set vertices and edges colors for a multilevel network. Default set to blue (higher level) and red (lower level).
set_color_multilevel(x, color.true = "blue", color.false = "red", V.alpha = 0.7, E.alpha = 0.7)
a graph object. Must be a multilevel network.
a character. The color to be chosen for the higher level (attribute type set to TRUE).
type
TRUE
a character. The color to be chosen for the lower level (attribute type set to FALSE).
FALSE
numeric. The factor modifying the opacity alpha for the vertices; typically in [0,1].
numeric. The factor modifying the opacity alpha for the edges; typically in [0,1].
A graph object. A multilevel network with an added color vertex attribute vector and a color edge attribute vector.
color
# NOT RUN { # Check whether a graph is multilevel is_multilevel(linked_sim) # Set the colors for each level linked_sim <- set_color_multilevel(linked_sim) # }
Run the code above in your browser using DataLab