I am currently trying to colour tipbars based on a if statement. Whenever I use the rotateNode function, the length of the bars and the tiplabels are rotated too, but the colouring of the bars does not and does "stick" to the old order. Is this something I can solve or is this a bug in the code?
I am using:
Hi Liam,
I am currently trying to colour tipbars based on a if statement. Whenever I use the rotateNode function, the length of the bars and the tiplabels are rotated too, but the colouring of the bars does not and does "stick" to the old order. Is this something I can solve or is this a bug in the code? I am using:
mytimetree<-read.newick("mytimetree.tre") hostfam_ranges<-as.matrix(read.csv("host_range.csv",row.names=1))[,1] mytimetree<-rotateNodes(mytimetree,"all") plotTree.barplot(mytimetree,hostfam_ranges,args.barplot=list(col=sapply(hostfam_ranges,function(hostfam_ranges) if(hostfam_ranges<=1) "green" else "yellow")))
Thanks in advance for your help!