plot.contactnet: Plot the contact network of 'contactnet' object

Description Usage Arguments Value See Also Examples

View source: R/netdis.r

Description

plot.contactnet is an S3 method that plots the contact network of an S3 object of class contactnet.

Usage

1
2
## S3 method for class 'contactnet'
plot(x, ...)

Arguments

x

an S3 object of class contactnet (i.e. the output of the contactnet function).

...

additional arguments that are passed to the generic plot function.

Value

Plot of the contact network.

See Also

contactnet.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(12345)
loc<- matrix(cbind(runif(50, 0, 10),runif(50, 0, 10)), ncol = 2, nrow = 50)
net1<- contactnet(type = "powerlaw", location = loc, beta = 1.5, nu = 0.5)
plot(net1)
net2<- contactnet(type = "Cauchy", location = loc, beta = 0.5)
plot(net2)
net3<- contactnet(type = "random", num.id = 50, beta = 0.08)
plot(net3)
# adding some options to the igraph plot:
plot(net3, vertex.color = "red", vertex.size = 8, edge.color = "black",
vertex.label.cex = 0.7, vertex.label.color = "black") 

Example output

Loading required package: coda
Loading required package: parallel

EpiILMCT documentation built on June 29, 2021, 9:08 a.m.