dplot3_graphjs: Plot network using 'threejs::graphjs'

View source: R/dplot3_graphjs.R

dplot3_graphjsR Documentation

Plot network using threejs::graphjs

Description

Interactive plotting of an igraph net using threejs

Usage

dplot3_graphjs(
  net,
  vertex.size = 1,
  vertex.col = NULL,
  vertex.label.col = NULL,
  vertex.label.alpha = 0.66,
  vertex.frame.col = NA,
  vertex.label = NULL,
  vertex.shape = "circle",
  edge.col = NULL,
  edge.alpha = 0.5,
  edge.curved = 0.35,
  edge.width = 2,
  layout = c("fr", "dh", "drl", "gem", "graphopt", "kk", "lgl", "mds", "sugiyama"),
  coords = NULL,
  layout_params = list(),
  cluster = NULL,
  groups = NULL,
  cluster_params = list(),
  cluster_mark_groups = TRUE,
  cluster_color_vertices = FALSE,
  main = "",
  theme = rtTheme,
  theme_extra_args = list(),
  palette = rtPalette,
  mar = rep(0, 4),
  par.reset = TRUE,
  filename = NULL,
  verbose = TRUE,
  ...
)

Arguments

net

igraph network

vertex.size

Numeric: Vertex size

vertex.col

Color for vertices

vertex.label.col

Color for vertex labels

vertex.label.alpha

Numeric: transparency for vertex.label.col

vertex.frame.col

Color for vertex border (frame)

vertex.label

Character vector: Vertex labels. Default = NULL, which will keep existing names in net if any. Set to NA to avoid printing vertex labels

vertex.shape

Character, vector, length 1 or N nodes: Vertex shape. See graphjs("vertex.shape"). Default = "circle"

edge.col

Color for edges

edge.alpha

Numeric: Transparency for edges

edge.curved

Numeric: Curvature of edges. Default = .35

edge.width

Numeric: Edge thickness

layout

Character: one of: "fr", "dh", "drl", "gem", "graphopt", "kk", "lgl", "mds", "sugiyama", corresponding to all the available layouts in igraph

coords

Output of precomputed igraph layout. If provided, layout is ignored

layout_params

List of parameters to pass to layout function

cluster

Character: one of: "edge_betweenness", "fast_greedy", "infomap", "label_prop", "leading_eigen", "louvain", "optimal", "spinglass", "walktrap", corresponding to all the available igraph clustering functions

groups

Output of precomputed igraph clustering. If provided, cluster is ignored

cluster_params

List of parameters to pass to cluster function

cluster_mark_groups

Logical: If TRUE, draw polygons to indicate clusters, if groups or cluster defined

cluster_color_vertices

Logical: If TRUE, color vertices by cluster membership

main

Character: main title

theme

rtemis theme to use

theme_extra_args

List of extra arguments to pass to the theme function defined by theme. This argument is used when the extra args (...) are passed the plotting function, in this case igraph::plot.igraph and not to the theme function

palette

Color vector or name of rtemis palette

mar

Numeric vector, length 4: par's margin argument

par.reset

Logical: If TRUE, reset par before exiting. Default = TRUE

filename

Character: If provided, save plot to this filepath

verbose

Logical, If TRUE, print messages to console. Default = TRUE

...

Extra arguments to pass to igraph::plot.igraph()

Author(s)

E.D. Gennatas


egenn/rtemis documentation built on Oct. 28, 2024, 6:30 a.m.