In the past few days I have posted two different visualization methods that can
both be used to visualize continuous trait data for multiple characters across
the tips of a tree. The first, phylo.heatmap, plots a multivariate
'heatmap' of trait values for multiple characters in a grid (e.g.,
1,
2).
The second, dotTree, shows one or multiple traits plotted on the
tips of the tree using different sized circles or dots (e.g.,
1,
2).
Tonight, I added the same standardization option that was already available in
phylo.heatmap to dotTree. This update can be seen
here.
Having done this, I thought it might be interesting to visually compare the
two methods, since they are effectively being used to represent the same data.
Here is what that looks like:
library(phytools)
## Loading required package: ape
## Loading required package: maps
##
## # ATTENTION: maps v3.0 has an updated 'world' map. #
## # Many country borders and names have changed since 1990. #
## # Type '?world' or 'news(package="maps")'. See README_v3. #
## simulate tree & data for 6 traits
tree<-rtree(n=26,tip.label=LETTERS)
X<-fastBM(tree,nsim=6)
## unstandardized
phylo.heatmap(tree,X)
dotTree(tree,X,length=8) ## lengthen the legend
## standardized
phylo.heatmap(tree,X,standardize=TRUE)
dotTree(tree,X,standardize=TRUE,length=8)
That's it.