Description Usage Arguments Warning Author(s) References See Also Examples
Works in the same way as the addTimeLine
part of drawPhylo
, only ....
1 2 |
tmScl |
The time scale for the time axis. |
whatTime |
Which columns of the time scale should be plotted |
addTimeLine |
Two options (or only their first letter) are accepted: "classic" (default, plots a set of rectangular boxes with labels on the left-hand side of the cladogram); "tube" (plots grey and white rectangles underneath the cladogram, as London tube maps plot travelcard zones). |
l2r |
Should the time axis run from left to right or top to bottom? Defaults to FALSE, i.e. top to bottom. |
nmLim |
A number of million years that serves as the limit for when the name of the period/epoch/stage/etc... should be printed in the 'classic' time axis. Defaults to 2. |
cexText |
Change the text size of time labels. See |
srtText |
Change the text direction of time labels. See |
cexTime |
Change the text size of time numbers. Defaults to the size of |
cexLab |
Change the text size of species lineage names. See |
whSpc |
Controls the amount of white space around the phlyogram. Increasing values of |
lwdLin |
Change the line thickness. See |
dumpLast |
If |
sz |
Controls the proportion of the plot given over to a 'classic' time axis. Defaults to 0.2. |
need to use close.screen()
after the plot if addTimeLine="classic"
as split.screen
is used to partition up the device.
Thomas H.G. Ezard t.ezard@soton.ac.uk
Ezard, T.H.G. & Purvis, A. (2009). paleoPhylo: free software to draw paleobiological phylogenies. Paleobiology 35, 460-464. doi: 10.1666/0094-8373-35.3.460.
drawPhylo
, split.screen
pearson93
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ##draw a diversity curve for pearson93 phylogeny
data(pearson93)
op <- par(no.readonly=TRUE)
p93 <- with(pearson93, as.paleoPhylo(Code, Parent, Start, End, label=Name))
data(berggren95)
tmScl <- berggren95
tmScl <- tmScl[tmScl$MA>=min(p93$en),]
tmScl <- tmScl[tmScl$MA<=max(p93$st),]
dvrstyTime <- seq(max(p93$st),min(p93$en), -0.2)
abndncTime <- numeric(length(dvrstyTime))
for (k in 1:length(dvrstyTime))
{abndncTime[k] <- sum(p93$st>dvrstyTime[k] & p93$en<=dvrstyTime[k])}
timeAxis(tmScl, c("epoch", "zone"), l2r=TRUE, dumpLast=FALSE,
cexText=c(1, 0.5), srtText=c(0,90, 0), nmLim=0.3, whSpc=0.12)
lines(-dvrstyTime ,abndncTime/max(abndncTime), lwd=2)
#currently the y-axis scales from 0 to 1, hence the use of proportions here for the diversity curve
abdnLab <- round(seq(0, max(abndncTime), length.out=5),0)
axis(2, at= seq(0,1,.25), labels=abdnLab, line=-3)
mtext("Abundance",2, line=-1, outer=FALSE, cex=1.5)
close.screen(2,all=TRUE)
##the 2 refers to the second panel, which is active and draws the (here) diversity curve
par(op)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.