Skip to contents

Plots the nodes of an ENA model using plotly, with options for node size, color, labels, and self-connections.

Usage

nodes(
  x,
  ...,
  weighted_nodes = TRUE,
  node_size_multiplier = 1,
  node_color = "#3E4750",
  node_sizes = 1,
  node_direction = 2,
  self_connections = weighted_nodes,
  self_connection_color = "#000000",
  nodes_include_self = TRUE,
  node_halo = 0,
  self_connection_halo = 0,
  node_labels = TRUE,
  node_position_multiplier = 1,
  node_saturation_multiplier = 1,
  sender_direction = 1,
  weights = NULL,
  nodes = NULL
)

Arguments

x

An ENA model object or plotly object with model attached.

...

Additional arguments passed to plotting functions.

weighted_nodes

Logical; if TRUE, node sizes are weighted (default: TRUE).

node_size_multiplier

Numeric; scales node sizes (default: 1).

node_color

Character; color(s) for nodes (default: "#3E4750").

node_sizes

Numeric; custom node sizes (default: 1).

node_direction

Integer; direction for node size calculation (default: 2).

self_connections

Logical; if TRUE, show self-connections (default: weighted_nodes).

self_connection_color

Character; color(s) for self-connections (default: "#000000").

nodes_include_self

Logical; if TRUE, include self-connections in node size (default: TRUE).

node_halo

Numeric; width of node halo (default: 0).

self_connection_halo

Numeric; width of self-connection halo (default: 0).

node_labels

Logical; if TRUE, show node labels (default: TRUE).

node_position_multiplier

Numeric; scales node positions (default: 1).

node_saturation_multiplier

Numeric; controls node color saturation (default: 1).

sender_direction

Integer; direction for sender (default: 1).

weights

Optional; edge weights to use (default: from model).

nodes

Optional; node positions to use (default: from model).

Value

A plotly object with ENA nodes drawn.