p3 <- facet_plot(p, panel = 'Stacked Barplot', data = df,
geom = geom_barh,
mapping = aes(x = value, fill = as.factor(category)),
stat='identity' ) + theme_tree2()
facet_plot(p3, geom=geom_text, mapping=aes(x=total+20, label=round(total)), data=sum_value, panel='Stacked Barplot')
Adding a layer to a specific panel was supported in facet_plot, if you specific the panel name to the one you want to add.
--
G Yu, DK Smith, H Zhu, Y Guan, TTY Lam*. ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data, Methods in Ecology and Evolution, 2017, 8(1):28-36. doi:10.1111/2041-210X.12628
Homepage: https://guangchuangyu.github.io/ggtree
---
You received this message because you are subscribed to the Google Groups "ggtree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bioc-ggtree+unsubscribe@googlegroups.com.
To post to this group, send email to bioc-...@googlegroups.com.
Visit this group at https://groups.google.com/group/bioc-ggtree.
To view this discussion on the web visit https://groups.google.com/d/msgid/bioc-ggtree/19e84168-78ba-4574-b695-bf608b816745%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.