returns a ggplot built from the per-period plot.netify() output,
with gganimate::transition_manual() keyed on the time variable
so the animation steps through each period. requires the
gganimate package.
Arguments
- netlet
a longitudinal netify object (
longit_array/longit_list).- ...
additional arguments passed to
plot.netify()(node_color_by,node_size_by,style, etc.).- static_actor_positions
logical. if
TRUE(default for animation since positions jumping around between periods is visually confusing), pin node positions across time.
Details
for static facet plots, just call plot(net) on a longit netlet
– that defaults to faceting by time. use animate_netify() for
single-panel transitions instead of grid faceting (better for
presentations / videos where the eye can focus on one period at a
time).
Examples
# \donttest{
data(classroom_edges)
classroom_panel <- rbind(
transform(classroom_edges[1:12, ], wave = 1),
transform(classroom_edges[13:24, ], wave = 2)
)
longit_net <- netify(
classroom_panel,
actor1 = "from", actor2 = "to", time = "wave",
symmetric = TRUE,
missing_to_zero = TRUE
)
anim <- animate_netify(longit_net)
# }