timePrism | R Documentation |
Plots an image using scatterplot3d
to render multiple network layout 'slices' in a '3D' orthographic projection in which one axis is time. The coordinates for the networks are assumed to have been generated by compute.animation
timePrism(nd, at,
spline.v = NULL,
spline.col = "#55555555",
spline.lwd = 1,
box = TRUE,
axis = TRUE,
planes = FALSE,
plane.col = "#FFFFFF99",
scale.y = 1,
angle = 20,
orientation = c("x", "y", "z"),
...)
nd |
a |
at |
a numeric vector of times at which the network should be sampled and plotted. |
spline.v |
optional integer vector of vertex ids to highlight with a spline linking the vertices” positions at multiple time points |
spline.col |
vector of colors corresponding to |
spline.lwd |
numeric line width for vector splines |
box |
a logical value indicating whether a box should be drawn around the plot to indicate its bounds |
axis |
a logical value indicating whether the x, y, and z axis should be drawn. |
planes |
a logical value indicating whether a 'plane' should be drawn to indicate the boundaries of each individual network plot |
plane.col |
a color value to be used to color the planes (usually partially transparent) |
scale.y |
numeric value giving the relative scale of y axis related to x- and z axis. (may distort network vertex shapes) |
angle |
numeric angle (degrees) between x and y axis (Attention: result depends on scaling). |
orientation |
three-element charter vector the permutation of which determines the mapping and orientation of the plot axis relative to the figure. i.e. default |
... |
additional parameters to |
Implements a common conceptualization of dynamic networks a series of 'layers' or 'slices' in time. Mostly useful for illustrative purposes as this plot type tends to get really crowded if more than a few network time points are shown, or vertices highlighted.
invisibly returns the result of the scatterplot3d
command, which contains useful functions as $xyz.convert
which can be used to convert xyz coordinates into the plot space for additional annotation.
Not all of the useful argument passthroughs to scatterplot3d and xspline have been implemented yet. Shapes of vertices and edges can be improperly distorted by coordinate projection.
skyebend@uw.edu
compute.animation
,scatterplot3d
, xspline
, plot.network
. Also filmstrip
and proxmity.timeline
for related static views.
data("short.stergm.sim")
compute.animation(short.stergm.sim)
timePrism(short.stergm.sim,at=c(1,10,20),
displaylabels=TRUE,
label.cex=0.5)
data(toy_epi_sim)
timePrism(toy_epi_sim,
orientation=c('z','y','x'),
angle=40,
spline.v=c(7, 29, 36, 70, 82, 96), # hilite the infected
spline.col='red',
spline.lwd=2,
box=FALSE,
planes=TRUE,
vertex.col='ndtvcol')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.