Description Usage Arguments Value
A convenience function to add colors to a graph of the igraph
format based on a vector of vertex attributes.
1 | graph.color.vertices(g, attribute, pallete = NULL)
|
g |
A graph object in the |
attribute |
A vertex attribute to organize the colors. Either use a categorical vector (factor, character) to color categories in different colors, or use a numerical vector (numerical, integer) to highlight with one color (like a heat map) |
pallete |
Optional. Add a custom pallete, which should be a character vector with color codes that igraph can use. |
A graph object in the igraph
format
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.