sgraph_clusters {sgraph} | R Documentation |
Build a sgraph object colored by clusters
Description
Wrapper function to build a sigma.js visualization of an igraph object and color it using a 'clusters' attribute. It calls the sigma_from_igraph function, and manages labels, node sizes, color mapping, layouts, and optionally arrows. The clusters attribute can be also be disabled to just use the wrapper to manage the other attributes.
Usage
sgraph_clusters(
igraph,
color_map = NULL,
label = "name",
clusters = TRUE,
arrows = FALSE,
node_size = NULL,
layout = igraph::layout_with_fr(igraph),
...
)
Arguments
igraph |
Igraph object |
color_map |
Use a color mapping to select colors (enables to link the graph with other plots) as returned by the get_color_map function. Leave NULL for automatic colors (default). |
label |
Name of the igraph attribute to use as labels |
clusters |
Whether or not to use a column named clusters to color the nodes. |
arrows |
Whether or not to display arrows on directed edges. |
node_size |
Passed to add_node_size function, either a numeric or an attribute name. Default is NULL. |
layout |
Output of an igraph layout (default: layout_with_fr) |
... |
Passed to sigma_from_igraph |
Value
Htmlwidget object