Learn R Programming

ergm.sign (version 0.1.2)

plot.dynamic.sign: Visualization for Dynamic Signed Networks

Description

plot.dynamic.sign() visualizes a dynamic signed network over multiple timepoints.

Usage

# S3 method for dynamic.sign
plot(
  x,
  col_pos = "#008000",
  col_neg = "#E3000F",
  neg.lty = 1,
  inv_weights = TRUE,
  time = NULL,
  titles = NULL,
  fix.pos = TRUE,
  ...
)

Value

A list of plots, one for each selected timepoint.

Arguments

x

A signed network object of class dynamic.sign.

col_pos

Color for positive edges. Default is 'green3'.

col_neg

Color for negative edges. Default is 'red3'.

neg.lty

Line type for negative edges. Default is "solid". Other options are "dotted" and "dashed".

inv_weights

Logical. If TRUE, edge weights are inverted (1/weights) so positive edges pull nodes closer together. Default is TRUE.

time

A vector of integers indicating which timepoints should be visualized. Defaults to all.

titles

A character vector of names for the timepoints.

fix.pos

Logical. If TRUE, the layout is fixed across timepoints based on the first timepoint. Default is TRUE.

...

Additional arguments passed to the plot function.

Layout

Uses a force-directed graph layout based on stress majorization, implemented in the graphlayouts package via layout_with_stress(). Similar to Kamada-Kawai, but generally faster and with better results.