sigma_from_igraph {sgraph} | R Documentation |
Basic sigma.js visualization of an igraph object, with pipeable syntax.
sigma_from_igraph(
igraph,
layout = NULL,
label_color = "#fff",
width = "100%",
height = "400px",
elementId = NULL,
label_grid_cell_size = 200
)
igraph |
Igraph object |
layout |
Output of an igraph layout (default: layout_nicely) |
label_color |
Hex color for labels |
width |
Width of the output graph (default: fit container) |
height |
Height of the output graph (default: fit container) |
elementId |
Do not specify, used by the htmlwidgets package |
label_grid_cell_size |
Sigma.js corresponding parameter. Roughly goes from 1 to 5000, the smaller the more labels displayed. |
Htmlwidget object, meant to be called directly to render a default visualization, or passed to other functions to change attributes (colors, sizes, interactivity, etc.).
library(sgraph)
data(lesMis)
sig <- sigma_from_igraph(igraph = lesMis)
sig