geom_hilight(node=63,fill="#1E90FF",type="rect",alpha=0.6)+ geom_hilight(node=36,fill="#FF8C00",type="rect",alpha=0.6)+ geom_hilight(node=43,fill="#4DAF4A",type="rect",alpha=0.6)+ geom_hilight(node=47,fill="#984EA3",type="rect",alpha=0.6)+ geom_point2(aes(subset=!isTip...
#geom_tiplab(hjust = -.5,size=3,fontface="plain")+ #设置标签显示 geom_point2(aes(subset=!isTip,fill=support), shape=21,size=2)+ scale_fill_continuous(low='green', high='red')+ labs(fill = "bootstrap") 参考:https://rdrr.io/bioc/ggtree/man/geom_strip.html https://bioconductor...
p1+geom_text2(aes(subset=!isTip,label=support))#添加bootstrap values在最开始读入树文件的时候可能得该用read.newick()函数;tree<-read.newick("input.tree",node.label="support") p1+geom_hilight(node=51,fill="red")+geom_hilight(node=43,fill="blue")#geom_hilight()函数添加色块 p1+geom_clade...
+#offset.text调整label位置;extend调整条带之间间距;offset设置距离节点的位置;#hjust="center"将lable居中放置geom_strip(35,52,label="Group II",align=T,alpha=.8,family="Times",offset=3,color="green",offset.text=2,fontsize=4,hjust="center",barsize=4,extend=0.5,angle=45)+geom_strip(20,34,...
geom_hilight(node = 41, fill ="#9467BDFF", alpha = 0.2) + geom_hilight(node = 50, fill ="#FFBB78FF", alpha = 0.2) p11 #显示进化树内外节点: #geom_nodepoint显示内部节点;geom_tippoint显示外部节点 p000<- p00 + geom_nodepoint(color ="#AEC7E8FF", alpha = 0.5, size = 6) +...
ggtree(tree)+geom_tiplab()+ geom_tippoint() geom_tiplab()函数中的一些参数align=T标签右对齐linesize = 16标签右对齐后会有线连接,设置线的粗细linetype = 1设置线的类型,默认是虚线offset=2设置标签距离枝末端的距离 ggtree(tree)+ geom_tiplab(align=T,linesize = 5,linetype = 1,offset = 2) ...
ggplot(data=dat02,aes(x=log2foldchange,y=tiplabel))+ geom_point(aes(size=`Mean relative abundance`, fill=groupinfo), shape=21)+ geom_vline(xintercept = 0,lty="dashed",color="grey")+facet_wrap(~species,nrow = 1, scales = 'free')+ ...
geom_point2(aes(subset=!isTip,fill=support), shape=21,size=2)+ scale_fill_continuous(low='green', high='red')+ labs(fill = "bootstrap") 参考:https://rdrr.io/bioc/ggtree/man/geom_strip.htmlhttps://bioconductor.org/packages/devel/bioc/vignettes/ggtreeExtra/inst/doc/ggtreeExtra.htmlhttp...
除了绘制进化树,ggtree还可以与其他数据集进行交互和可视化。例如,可以使用ggtree的geom_point()函数来在进化树上添加数据点: data<-read.table("data.txt")g<-g+geom_point(data=data,aes(x=branch.length,y=data.value),size=3) 1. 2. 该代码将根据数据集中的branch.length和data.value列在进化树上添加...
geom_nodepoint 使用符号点注释内部节点 geom_point2 geom_point的修改版本,支持子集 geom_rootpoint 用符号点注释根节点 geom_text2 geom_text的修改版本,支持子集 geom_tiplab 尖端标签层,可以是文本或图像 geom_tippoint 用符号点注释外部节点 geom_tree ...