Problem plotting with revts() and geom_nodelab()

113 views
Skip to first unread message

jonna...@gmail.com

unread,
Nov 9, 2018, 9:54:09 PM11/9/18
to ggtree
Hi,

I am having an issue plotting nodelabels. Everything works fine until I reverse the x axis, then the nodelabels plot next to the tree, almost like a facet.

Example:


x <- read.beast("/Applications/FigTree/influenza.tree")
x1 <- ggtree(x) + theme_tree2()
x2 <- revts(x1) 
x3 <- x2 + scale_x_continuous(breaks=c(-13:0), labels=abs(-13:0))
x3

Screen Shot 2018-11-10 at 9.51.40 AM.png


Then once I add the node labels:


x4 <- x3 + geom_nodelab(aes(x=branch, label=round(posterior, 2)))
x4

Screen Shot 2018-11-10 at 9.51.53 AM.png

I have tried this in different orders (node labels first, then revts()) but I can't figure it out. 

Any ideas?

Thanks you!
Jon

Yu, Guangchuang

unread,
Nov 10, 2018, 11:59:29 AM11/10/18
to jonna...@gmail.com, bioc-...@googlegroups.com
thanks for your report and it has been fixed in v = 1.14.2.


--
G Yu, DK Smith, H Zhu, Y Guan, TTY Lam*. ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data, Methods in Ecology and Evolution, 2017, 8(1):28-36. doi:10.1111/2041-210X.12628
 
Homepage: https://guangchuangyu.github.io/software/ggtree
---
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/50765a34-53e5-44d2-bb8f-6d20a11fa890%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
--~--~---------~--~----~------------~-------~--~----~
Guangchuang Yu PhD
Professor
School of Basic Medical Sciences
Southern Medical University
Guangzhou, China
-~----------~----~----~----~------~----~------~--~---

jonna...@gmail.com

unread,
Nov 10, 2018, 8:10:12 PM11/10/18
to ggtree
Thank you. Is 1.14.2 available? I can only find 1.14.1 and the dev version 1.15.1

Jon
Reply all
Reply to author
Forward
0 new messages