Plot ENA edges
edges.RdPlots the edges (connections) between nodes in an ENA model using plotly, with options for color, width, direction, and arrowheads.
Usage
edges(
x,
...,
show_edge_center = FALSE,
units = NULL,
edge_color = c("#FF0000", "#0000FF"),
edge_end = "outward",
desaturate_edges_by = sqrt,
lighten_edges_by = desaturate_edges_by,
multiplier = 1,
edge_size_multiplier = multiplier,
edges_behind_nodes = TRUE,
sender_direction = 1,
scale_edges_to = c(0, 1),
scale_edges_from = NULL,
edge_arrow = TRUE,
edge_arrow_offset = 2,
edge_arrow_width = 0.1,
edge_arrows_to_show = "max",
edge_arrow_saturation_multiplier = 1.1,
fake_alpha = TRUE,
edge_halo = 0.5,
edge_halo_multiplier = 1.1,
arrow_halo = 0,
edge_arrow_direction = 2,
node_position_multiplier = 1,
weights = NULL,
nodes = NULL
)Arguments
- x
An ENA model object or plotly object with model attached.
- ...
Additional arguments passed to plotting functions.
- show_edge_center
Logical; if TRUE, show edge centers (default: FALSE).
- units
Optional; units to include in the plot.
- edge_color
Character vector of edge colors (default: c("#FF0000", "#0000FF")).
- edge_end
Character; "outward" or "inward" (default: "outward").
- desaturate_edges_by
Function or string; controls edge desaturation (default: sqrt).
- lighten_edges_by
Function or string; controls edge lightening (default: same as desaturate_edges_by).
- multiplier
Numeric; scales edge sizes (default: 1).
- edge_size_multiplier
Numeric; scales edge width (default: multiplier).
- edges_behind_nodes
Logical; if TRUE, draw edges behind nodes (default: TRUE).
- sender_direction
Integer; direction for sender (default: 1).
- scale_edges_to
Numeric vector; range to scale edge weights to (default: c(0,1)).
- scale_edges_from
Numeric vector; range of edge weights to scale from (default: NULL).
- edge_arrow
Logical; if TRUE, draw arrowheads (default: TRUE).
- edge_arrow_offset
Numeric; offset for arrowhead placement (default: 2).
- edge_arrow_width
Numeric; width of arrowhead (default: 0.1).
- edge_arrows_to_show
Character; which arrows to show (default: "max").
- edge_arrow_saturation_multiplier
Numeric; controls arrowhead color saturation (default: 1.1).
- fake_alpha
Logical; if TRUE, simulate alpha blending (default: TRUE).
- edge_halo
Numeric; width of edge halo (default: 0.5).
- edge_halo_multiplier
Numeric; multiplier for edge halo (default: 1.1).
- arrow_halo
Numeric; width of arrow halo (default: 0).
- edge_arrow_direction
Integer; direction for arrowhead (default: 2).
- node_position_multiplier
Numeric; scales node positions (default: 1).
- weights
Optional; edge weights to use (default: from model).
- nodes
Optional; node positions to use (default: from model).