plotC | R Documentation |
Generate an Image of a Contact Matrix
plotC(
C,
grouping = NULL,
xlab = "age group of contact",
ylab = "age group of participant",
at = 15,
col.regions = rev(heat.colors(length(at) - 1)),
...,
contour = FALSE
)
C |
a square numeric matrix. |
grouping |
numeric vector of sizes of aggregated groups, e.g.,
|
xlab , ylab |
axis labels. |
at |
numeric vector of break points of the color levels, or a single
integer specifying the number of |
col.regions |
vector of color levels. |
... |
further arguments passed to |
contour |
logical indicating if a |
## contour plot
plotC(contactmatrix_POLYMOD, contour = TRUE)
## level plots illustrating aggregation of age groups
if (require("gridExtra")) {
grid.arrange(plotC(contactmatrix_POLYMOD, grouping = c(1,2,2,4,4,2)),
plotC(contactmatrix(grouping = c(1,2,2,4,4,2))),
nrow = 1)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.