phytools : contMap
Rのパッケージphytoolsのコマンドcontmapでは、系統樹の枝に各種の形質値に合わせた色付けができる。
-----------------------------------------
library(phytools)
###パッケージの設定
Tree<-pbtree(n=15)
###サンプル系統樹の読み込み
x<-c(runif(15))
labels<-c("t1", "t2", "t3", "t4", "t5", "t6", "t7", "t8", "t9", "t10", "t11", "t12", "t13", "t14", "t15")
names(x)<-labels
###サンプル系統樹の形質値、および、そのラベル付け
contMap(Tree, x, res=100)
###形質値の色付けされた系統樹が表示される(resは解像度)
-----------------------------------------
枝の色を変えたいときはsetMapを使う。