Displays a network at different time points as vertical planes inside a 3D oblique-projection box, with time flowing left to right. Each network plane extends into the depth of the box.
plot_temporal(
x,
time = NULL,
slices = NULL,
cumulative = FALSE,
labels = NULL,
layout = "spring",
node_size = 2.5,
node_color = "steelblue",
color_by = c("layer", "node"),
node_shape = 21,
node_border = "gray30",
edge_color = "#E41A1C",
edge_width = 1.5,
edge_alpha = 0.35,
plane_color = "gray92",
plane_alpha = 0.2,
plane_border = "gray60",
plane_lty = 2,
box = TRUE,
box_color = "gray40",
connections = FALSE,
connection_color = "gray50",
connection_alpha = 0.15,
minimum = 0,
show_labels = FALSE,
label_size = 0.4,
title = NULL,
angle = c(1, 0.7),
seed = 42,
...
)Invisible list of adjacency matrices per layer.
An edge list data frame with columns from, to, and
a time column, OR a cograph_network (reads time from stored data),
OR a named list of network objects.
Character. Name of the time column.
Integer or NULL. Number of equal-width time bins. Default NULL uses unique time values.
Logical. If TRUE, edges accumulate. Default FALSE.
Character vector of layer labels. Default auto.
Character or matrix. Character values currently use a shared
Fruchterman-Reingold/spring layout; a matrix supplies shared coordinates.
Default "spring".
Numeric. Node size. Default 2.5.
Character or vector. Node fill color. A single color
applies everywhere. An unnamed vector is recycled across layers,
coloring each plane as a whole. A named vector is matched to
node names instead and colors each node the same on every plane,
which is what makes a node identifiable as it moves through the stack;
names not present in the network are an error rather than silent. See
also color_by. The original text of this parameter continues:
a single color
applies to all layers, or a vector of length n_layers for
per-layer colors. Default "steelblue".
One of "layer" (the default, and the historical
behavior) or "node". Chooses what an unnamed node_color
vector indexes. A named node_color always colors by node and
ignores this argument.
Integer. Point shape (pch). Default 21 (filled
circle).
Character. Node border color. Default "gray30".
Character or vector. Edge color (single or per-layer).
Default "#E41A1C".
Numeric. Base edge width. Actual width scales by weight. Default 1.5.
Numeric. Edge transparency (0-1). Default 0.35.
Character or vector. Plane fill color (single or
per-layer). Default "gray92".
Numeric. Plane fill transparency (0-1). Default 0.2.
Character. Plane border color. Default
"gray60".
Integer. Plane border line type. Default 2 (dashed).
Logical. Draw 3D bounding box. Default TRUE.
Character. Box edge color. Default "gray40".
Logical. Draw lines connecting same nodes across planes. Default FALSE.
Character. Default "gray50".
Numeric. Default 0.15.
Numeric. Minimum edge weight to display. Default 0.
Logical. Default FALSE.
Numeric. Label text size. Default 0.4.
Character or NULL. Plot title. Default NULL.
Numeric vector of length 2: c(dz_x, dz_y) controlling
the oblique projection shear. Default c(1.0, 0.7).
Integer or NULL. Default 42.
Additional arguments (currently unused).
plot_network_evolution, plot_mlna
set.seed(1)
edges <- data.frame(
from = sample(LETTERS[1:5], 30, replace = TRUE),
to = sample(LETTERS[1:5], 30, replace = TRUE),
week = sample(1:3, 30, replace = TRUE))
cograph::plot_temporal(edges, time = "week")
Run the code above in your browser using DataLab