sigma_from_igraph: 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 = "100%",
height = "400px",
elementId = NULL,
label_grid_cell_size = 200
)
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.).
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.
Examples
Run this codelibrary(sgraph)
data(lesMis)
sig <- sigma_from_igraph(igraph = lesMis)
sig
Run the code above in your browser using DataLab