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

geom_tiplab does not work with geom_tree #272

Closed
brj1 opened this issue Jan 22, 2020 · 1 comment
Closed

geom_tiplab does not work with geom_tree #272

brj1 opened this issue Jan 22, 2020 · 1 comment

Comments

@brj1
Copy link
Contributor

brj1 commented Jan 22, 2020

Hi Guangchuang,

I found a weird bug today when I was trying to make a tree with scaled branch lengths based on node dates. I was plotting my trees using fortify(tree) %>% ggplot() + geom_tree() instead of ggtree(tree) and I found I could not get geom_tiplab to work. See the following example:

library(ggtree)
library(ape)

set.seed(0)
tree <- rtree(5)

# The following works
fortify(tree) %>% ggtree() + geom_tiplab()

# But this fails
fortify(tree) %>% ggplot() + geom_tree() + geom_tiplab()

# And so does this
ggplot(tree) + geom_tree() + geom_tiplab()

Below is the error message I get for both failing lines above

Error in layout == "circular" :
comparison (1) is possible only for atomic and list types

I am using the dev version of ggtree.

@GuangchuangYu
Copy link
Member

fixed in v >= 2.1.2

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

2 participants