Description Usage Arguments See Also Examples
View source: R/circular.time.slice.R
Adds a circular time slice to a ploted phylo
tree
of type = "fan"
1 | circular.time.slice(phy, start, end, col = "grey")
|
phy |
|
start |
start of the time slice (lower) |
end |
end of the time slice (upper) |
col |
choose color (default = "grey") |
1 2 3 4 5 6 7 8 9 10 11 | path <- system.file("data/mcc.tre", package="rBt")
tr <- read.beast.annot(path)
timerange <- range(branching.times(tr))
# equally spaced time slices
timeslices <- seq(timerange[1], timerange[2], length.out=5)
ts <- cbind(timeslices[-5], timeslices[-5]+((timeslices[3]-timeslices[2])/2))
# plot tree
plot(tr, type="fan", show.tip.label=F)
# add slice
for (i in 1:dim(ts)[1])
circular.time.slice(tr, ts[i,1], ts[i,2])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.