YuLab-SMU / ggtree

:christmas_tree:Visualization and annotation of phylogenetic trees
https://yulab-smu.top/treedata-book/
830 stars 172 forks source link

problem_of_revts() #553

Open Hong-Wun opened 1 year ago

Hong-Wun commented 1 year ago

Hi, I am having a problem of plotting ancestral states on the tree and reversing the time scale at the same time. I use Revgadets to plot ancestral states in R Add time scale image

After I use revts() to reverse the time scale, the ancestral states on nodes are at the wrong position. image

This is my code and file https://github.com/Hong-Wun/problem_of_revts.git

Session and version info:

R version 4.2.1 (2022-06-23 ucrt) os: Windows 10 x64 (build 22621) system: x86_64, mingw32 ggplot2_3.4.0 ggtree_3.4.2

Any suggestions will be appreciated.