'R: ggtree gradient highlight issue
I try to fill two clades with gradient color:
set.seed(123)
tree <- rtree(31)
df <- data.frame(node=c(47, 36), type=c("A", "B"))
ggtree(tree) + geom_text2(aes(subset=!isTip, label=node), hjust=-.3) +
geom_hilight(data = df,
aes(node = node, fill = type),
type = "gradient",
graident.direction = 'rt',
alpha=.6)
and get an error instead: Error in fix.by(by.x, x)
When I remove 'type = "gradient"' from a code, I get simple solid fill:
What's wrong with my code?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
