Description Usage Arguments Details Author(s) References Examples
Plots a phybreak-object as transmission tree. The default
is to plot the current state, but any posterior sample can be chosen, as well as various
consensus trees; in that case, coloured arrows indicate posterior support.
1 2 3 4 5 6 | plotTrans(x, plot.which = c("sample", "edmonds", "mpc", "mtcc"),
samplenr = 0, mar = 0.1 + c(4, 0, 0, 0), label.cex = NULL,
label.space = 0.15, label.adj = 0, arrow.lwd = 1, arrow.length = NULL,
arrow.col = NULL, sample.pch = 4, sample.lwd = NULL,
sample.cex = label.cex, polygon.col = "gray", polygon.border = NA,
line.lty = 3, xlab = "Time", axis.cex = 1, title.cex = 1, ...)
|
x |
An object of class |
plot.which |
Either |
samplenr |
If |
mar |
Plot margins. |
label.cex |
Size of host names, as in |
label.space |
Scales the space at the right-hand side to place the host names. |
label.adj |
Left-right adjustment of host names. |
arrow.lwd |
Arrow width. |
arrow.length |
Arrow point length, as default automatically scaled with outbreak size. |
arrow.col |
Arrow colour. Defaults to |
sample.pch |
Character |
sample.lwd |
Line width of sampling event character. |
sample.cex |
Size of sampling event character. |
polygon.col |
Color of polygons indicating generation interval distributions. |
polygon.border |
Border of polygon. |
line.lty |
Line type of horizontal host lines. |
xlab |
X-axis title. |
axis.cex |
Size of tick labels. |
title.cex |
Size of X-axis title. |
... |
Further graphical parameters (see details). |
Graphical parameters can be added by using names in the format prefix.parameter for the
different parts of the plot. The parameter will then be passed on to the appropriate
graphics function, e.g. arrow.lty to change the line type of the arrows. The following
prefixes can be used: label for the host labels, arrow for the arrows, sample
for the sampling time indicators, polygon for the generation interval distributions,
line for the horizontal host lines, axis for the X-axis, and title for the
X-axis title.
Don Klinkenberg don@xs4all.nl
Klinkenberg et al. (2017) Simultaneous inference of phylogenetic and transmission trees in infectious disease outbreaks. PLoS Comput Biol, 13(5): e1005495.
1 2 3 4 5 6 7 | #First build a phybreak-object containing samples.
simulation <- sim.phybreak(obsize = 5)
MCMCstate <- phybreak(data = simulation$sequences, times = simulation$sample.times)
MCMCstate <- burnin.phybreak(MCMCstate, ncycles = 20)
MCMCstate <- sample.phybreak(MCMCstate, nsample = 50, thin = 2)
plot(MCMCstate, plot.which = "mpc")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.