## load data from Mahler et al. (2010)
data(anoletree)
data(anole.data)
## extract overall body size (SVL)
svl<-setNames(anole.data$SVL,rownames(anole.data))
## plotTree.wBars
plotTree.wBars(anoletree,svl,type="fan",scal=0.5)
par(mar=c(5.1,4.1,4.1,2.1))
## plotTree.barplot
plotTree.barplot(anoletree,exp(svl),
args.plotTree=list(fsize=0.5),
args.barplot=list(xlab="SVL (mm)"))
## load vertebrate tree and data
data(vertebrate.tree)
data(vertebrate.data)
## plotTree.barplot
options(scipen=4) ## change sci-notation
par(cex.axis=0.8)
plotTree.barplot(vertebrate.tree,
setNames(vertebrate.data$Mass,
rownames(vertebrate.data)),
args.barplot=list(
log="x",
xlab="mass (kg)",
xlim=c(0.01,500000),
col=palette()[4]))
options(scipen=0)
## reset par to defaults
par(mfrow=c(1,1),mar=c(5.1,4.1,4.1,2.1),cex.axis=1)
Run the code above in your browser using DataLab