--
You received this message because you are subscribed to the Google Groups "ggtree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bioc-ggtree+unsubscribe@googlegroups.com.
To post to this group, send email to bioc-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bioc-ggtree/233f5587-f988-4f8a-89a0-ca4b35ef4d90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
just + theme(legend.position="right")
On Thu, Nov 17, 2016 at 1:06 PM, Mark Phuong <markp...@gmail.com> wrote:
Hi Guangchuang,Hope you are doing well. Many thanks for this great rpackage. I am having trouble figuring out how to generate a legend that shows how bootstrap values are colored on my tree. My code and input files are attached below. Do you have any ideas?Many thanks,Markconus.tree.boot <- read.raxml("RAxML_bipartitionsBranchLabels.conus_32_exon_cap")pbs <- ggtree(conus.tree.boot)conus.tree <- read.nexus("conus_tree_32_calibrated.nexus")p <- ggtree(conus.tree)p$data$bootstrap <- as.numeric(pbs$data$bootstrap)cols <- c("100" = "black", "95-99" = "#56B4E9", "60-95" = "#D55E00")p + geom_point2(aes(subset=!is.na(bootstrap) & bootstrap ==100,label = "100", color="100") ) +geom_point2(aes(subset=!is.na(bootstrap) & bootstrap >95 & bootstrap < 100, label="95-99", color="95-99")) +geom_point2(aes(subset=!is.na(bootstrap) & bootstrap <95, label="60-95", color="60-95")) +geom_treescale(x=10, y=10) +geom_tiplab(offset=2) + xlim(0,200) +scale_color_manual(name = "bootstrap", breaks=c("100", "95-99", "60-95"), values = cols, labels = c("100", "95-99", "60-95"))
--
You received this message because you are subscribed to the Google Groups "ggtree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bioc-ggtree...@googlegroups.com.
To post to this group, send email to bioc-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bioc-ggtree/233f5587-f988-4f8a-89a0-ca4b35ef4d90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.