Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't get same fig with example #1

Open
usernameCL311 opened this issue May 14, 2024 · 0 comments
Open

can't get same fig with example #1

usernameCL311 opened this issue May 14, 2024 · 0 comments

Comments

@usernameCL311
Copy link

usernameCL311 commented May 14, 2024

hi, i used treedataverse try to visualization the example in https://yulab-smu.top/treedata-book/chapter12.html, by the function of geom_hilight, i found the color block geom_hilight generated was placed wrong position.
there are some information and fig about the problem

R version 4.2.1 (2022-06-23 ucrt) -- "Funny-Looking Kid"
Copyright (C) 2022 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Workspace loaded from ~/.RData]

> library(treedataverse)
── Attaching packages ───────────────────────────────────────────────────────────────────── treedataverse 0.0.1 ──
✔ ape         5.7.1      ✔ treeio      1.20.2
✔ dplyr       1.1.4      ✔ ggtree      3.4.4 
✔ ggplot2     3.4.4      ✔ ggtreeExtra 1.6.1 
✔ tidytree    0.4.6      
── Conflicts ──────────────────────────────────────────────────────────────────────── treedataverse_conflicts() ──
✖ treeio::drop.tip()     masks tidytree::drop.tip(), ape::drop.tip()
✖ tidytree::filter()     masks dplyr::filter(), stats::filter()
✖ treeio::get.treetext() masks tidytree::get.treetext()
✖ tidytree::keep.tip()   masks ape::keep.tip()
✖ dplyr::lag()           masks stats::lag()
✖ ggtree::rotate()       masks ape::rotate()
✖ dplyr::where()         masks ape::where()
Warning messages:
1: 程辑包‘ape’是用R版本4.2.3 来建造的 
2: 程辑包‘dplyr’是用R版本4.2.3 来建造的 
3: 程辑包‘ggplot2’是用R版本4.2.3 来建造的 
4: 程辑包‘tidytree’是用R版本4.2.3 来建造的 
> set.seed(123)
> tree <- rtree(10)
> p <- ggtree(tree) + geom_tiplab() + 
+   geom_hilight(node = 12, extendto = 2.5)
> x <- paste("Taxa order:", 
+            paste0(get_taxa_name(p), collapse=', '))
> p + labs(title=x)

Snipaste_2024-05-14_16-11-59
Snipaste_2024-05-14_16-12-43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant