Draws a graph where the coordinates are given by time of adoption, xaxis, and threshold level, yaxis.
1 2 3 4 5 6 7 8 9 10 11  plot_threshold(graph, expo, toa, include_censored = FALSE, t0 = min(toa,
na.rm = TRUE), attrs = NULL, undirected = getOption("diffnet.undirected"),
no.contemporary = TRUE, main = "Time of Adoption by Network Threshold",
xlab = "Time", ylab = "Threshold", vertex.cex = "degree",
vertex.col = rgb(0.3, 0.3, 0.8, 0.5), vertex.label = "",
vertex.lab.pos = NULL, vertex.lab.cex = 1, vertex.lab.adj = c(0.5, 0.5),
vertex.lab.col = rgb(0.3, 0.3, 0.8, 0.9), vertex.sides = 40L,
vertex.rot = 0, edge.width = 2, edge.col = rgb(0.6, 0.6, 0.6, 0.1),
arrow.length = 0.2, include.grid = TRUE, bty = "n",
vertex.bcol = vertex.col, jitter.factor = c(1, 0),
jitter.amount = c(0.25, 0), xlim = NULL, ylim = NULL, ...)

graph 
A dynamic graph (see 
expo 
n * T matrix. Esposure to the innovation obtained from 
toa 
Integer vector of length n with the times of adoption. 
include_censored 
Logical scalar. Passed to 
t0 
Integer scalar. Passed to 
attrs 
Passed to 
undirected 
Logical scalar. When 
no.contemporary 
Logical scalar. When TRUE, edges for vertices with the same

main 
Character scalar. Title of the plot. 
xlab 
Character scalar. xaxis label. 
ylab 
Character scalar. yaxis label. 
vertex.cex 
Numeric vector of size n. Relative size of the vertices. 
vertex.col 
Either a vector of size n or a scalar indicating colors of the vertices. 
vertex.label 
Character vector of size n. Labels of the vertices. 
vertex.lab.pos 
Integer value to be passed to 
vertex.lab.cex 
Either a numeric scalar or vector of size n. Passed to 
vertex.lab.adj 
Passed to 
vertex.lab.col 
Passed to 
vertex.sides 
Either a vector of size n or a scalar indicating the number of sides of each vertex (see details). 
vertex.rot 
Either a vector of size n or a scalar indicating the rotation in radians of each vertex (see details). 
edge.width 
Numeric. Width of the edges. 
edge.col 
Character. Color of the edges. 
arrow.length 
Numeric value to be passed to 
include.grid 
Logical. When TRUE, the grid of the graph is drawn. 
bty 
See 
vertex.bcol 
Either a vector of size n or a scalar indicating colors of vertices' borders. 
jitter.factor 
Numeric vector of size 2 (for x and y) passed to 
jitter.amount 
Numeric vector of size 2 (for x and y) passed to 
xlim 
Passed to 
ylim 
Passed to 
... 
Additional arguments passed to 
When vertex.label=NULL
the function uses vertices ids as labels.
By default vertex.label=""
plots no labels.
Vertices are drawn using an internal function for generating polygons.
Polygons are inscribed in a circle of radius vertex.cex
, and can be
rotated using vertex.rot
. The number of sides of each polygon
is set via vertex.sides
.
George G. Vega Yon
Use threshold
to retrieve the corresponding threshold
obtained returned by exposure
.
Other visualizations: dgr
,
diffusionMap
, drawColorKey
,
grid_distribution
,
hazard_rate
, plot_adopters
,
plot_diffnet2
, plot_diffnet
,
plot_infectsuscep
,
rescale_vertex_igraph
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  # Generating a random graph
set.seed(1234)
n < 6
nper < 5
graph < rgraph_er(n,nper, p=.3, undirected = FALSE)
toa < sample(2000:(2000+nper1), n, TRUE)
adopt < toa_mat(toa)
# Computing exposure
expos < exposure(graph, adopt$cumadopt)
plot_threshold(graph, expos, toa)
# Calculating degree (for sizing the vertices)
plot_threshold(graph, expos, toa, vertex.cex = "indegree")

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.