sigma_from_igraph {sgraph} | R Documentation |
Build a sgraph object from an igraph object
Description
Basic sigma.js visualization of an igraph object, with pipeable syntax.
Usage
sigma_from_igraph(
igraph,
layout = NULL,
label_color = "#fff",
width = NULL,
height = NULL,
elementId = NULL,
label_grid_cell_size = 200
)
Arguments
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. |
Value
Htmlwidget object, meant to be called directly to render a default visualization, or passed to other functions to change attributes (colors, sizes, interactivity, etc.).
Examples
library(sgraph)
data(lesMis)
sig <- sigma_from_igraph(igraph = lesMis)
sig
[Package sgraph version 1.0.0 Index]