draw_graphD3: Plot graph using 'networkD3'

View source: R/draw_graphd3.R

draw_graphD3R Documentation

Plot graph using networkD3

Description

Plot graph using networkD3

Usage

draw_graphD3(
  net,
  groups = NULL,
  color_scale = NULL,
  edge_col = NULL,
  node_col = NULL,
  node_alpha = 0.5,
  edge_alpha = 0.33,
  zoom = TRUE,
  legend = FALSE,
  palette = rtemis_palette,
  theme = choose_theme(),
  ...
)

Arguments

net

igraph network.

groups

Vector, length n nodes indicating group/cluster/community membership of nodes in net.

color_scale

D3 colorscale (e.g. networkD3::JS("d3.scaleOrdinal(d3.schemeCategory20b);")).

edge_col

Color for edges.

node_col

Color for nodes.

node_alpha

Float [0, 1]: Node opacity.

edge_alpha

Float [0, 1]: Edge opacity.

zoom

Logical: If TRUE, graph is zoomable.

legend

Logical: If TRUE, display legend for groups.

palette

Vector of colors, or Character defining a builtin palette - get options with rtpalette().

theme

Theme object.

...

Additional arguments to pass to networkD3.

Value

forceNetwork object.

Author(s)

EDG


egenn/rtemis documentation built on June 14, 2025, 11:54 p.m.