You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I fear that this might not be a real issue but since I have tried to solve it through different approaches to no avail, I am posting it here.
I have been using geom_fruit / geom_tile to create the tree below but the tiles are all unaligned. From the examples I have seen so far, they should be automatically aligned, so I am not quite sure it is going on. I reckon I am still missing an argument, but I could not figure out which one would it be.
This is because the x of geom_tile was mapped to the BioStatus. Since each tip belonged to a single BioStatus not multiple BioStatus. You can remove the x or set x to a single integer . You can refer to the following codes.
> library(ggtree)
> library(ggtreeExtra)
> set.seed(123)
> tr <- rtree(100)
> da <- data.frame(id=tr$tip.label, test=c(rep("A",25),rep("B",25),rep("C", 25), rep("D", 25)))
> p <- ggtree(tr, layout="circular") + geom_tiplab(align=TRUE)
> p <- p %<+% da
> p + geom_fruit(geom=geom_tile, mapping=aes(fill=test), width=0.8, offset=0.3)
Note: Since the x was not mapped in aes. Please use width to adjust the width of geom_tile layer instead of pwidth. You can also see the answer
Hello everyone,
I fear that this might not be a real issue but since I have tried to solve it through different approaches to no avail, I am posting it here.
I have been using geom_fruit / geom_tile to create the tree below but the tiles are all unaligned. From the examples I have seen so far, they should be automatically aligned, so I am not quite sure it is going on. I reckon I am still missing an argument, but I could not figure out which one would it be.
Thanks in advance, George.
The text was updated successfully, but these errors were encountered: