-
Notifications
You must be signed in to change notification settings - Fork 171
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_hilight #621
Comments
Ideally geom-hilights should automatically be placed behind all tree features by default. |
You can put the hilight geoms behind the tree by adding the hilight geom first and then the tree geom. # example tree and data
nwk <- system.file("extdata", "sample.nwk", package="treeio")
tree <- read.tree(nwk)
d <- data.frame(17, 21), type=c("A", "B"))
# geom_hilight last
ggtree(tree) + geom_hilight(data=d, aes(node=node, fill=type),
type = "roundrect", alpha = 1)
# geom_hilight first
ggplot(tree) + geom_hilight(data=d, aes(node=node, fill=type),
type = "roundrect", alpha = 1) + geom_tree() + theme_tree() |
Thanks Brad, that’s what I did to solve the issue. However, it seems to me that a geom_hilight call (if possible) ought to put the feature in the background by default. In my experience, calling ggtree with no arguments is problematic because many of its arguments don’t work in geom_tree. For example, layout doesn't appear to work in geom_tree, so I am unable to generate anything but a rectangular tree using this workaround. |
Prerequisites
Describe you issue
Ask in right place
The text was updated successfully, but these errors were encountered: