---
output:
md_document:
variant: markdown_github
html_preview: false
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
# ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data
```{r echo=FALSE, results="hide", message=FALSE}
#library("txtplot")
library("badger")
library("ypages")
library("ggplot2")
```
<img src="https://raw.githubusercontent.com/Bioconductor/BiocStickers/master/ggtree/ggtree.png" height="200" align="right" />
`r badge_bioc_release("ggtree", "green")`
`r badge_devel("guangchuangyu/ggtree", "green")`
[](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#since)
`r badge_bioc_download("ggtree", "total", "blue")`
`r badge_bioc_download("ggtree", "month", "blue")`
[](http://www.repostatus.org/#active)
[](https://codecov.io/gh/GuangchuangYu/ggtree)
[)`-green.svg)](https://github.com/GuangchuangYu/ggtree/commits/master)
[](https://github.com/GuangchuangYu/ggtree/network)
[](https://github.com/GuangchuangYu/ggtree/stargazers)
[](https://awesome-r.com/#awesome-r-graphic-displays)
[](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#archives)
[](https://bioconductor.org/checkResults/devel/bioc-LATEST/ggtree/)
[](https://travis-ci.org/GuangchuangYu/ggtree)
[](https://ci.appveyor.com/project/GuangchuangYu/ggtree)
[](#backers)
[](#sponsors)
The `ggtree` package extending the `ggplot2` package. It based on grammar of graphics and takes all the good parts of `ggplot2`. `ggtree` is designed for not only viewing phylogenetic tree but also displaying annotation data on the tree.
[](https://twitter.com/intent/tweet?hashtags=ggtree&url=http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12628/abstract&screen_name=guangchuangyu)
For details, please visit our project website, <https://guangchuangyu.github.io/ggtree>.
+ [Documentation](https://guangchuangyu.github.io/ggtree/documentation/)
+ [FAQ](https://guangchuangyu.github.io/ggtree/faq/)
+ [Featured Articles](https://guangchuangyu.github.io/ggtree/featuredArticles/)
+ [Feedback](https://guangchuangyu.github.io/ggtree/#feedback)
-----------------------------------------------------
Please cite the following article when using `ggtree`:
__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.
`r badge_doi("10.1111/2041-210X.12628", "green")`
`r badge_altmetric("10533079", "green")`
----------------------------------------------------------------------------------------
### Citation
`r badge_citation("HtEfBTGE9r8C", "7268358477862164627", "green")`
```{r echo=F, comment=NA}
d <- get_article_cite_history('DO5oG40AAAAJ', 'HtEfBTGE9r8C')
## txtplot(d$year, d$cites)
## library("ggalt")
## p <- ggplot(d, aes(year, cites)) + geom_lollipop(point.size=3, point.colour='firebrick') +
p <- ggplot(d, aes(year, cites)) + geom_segment(aes(xend=year, yend=0)) + geom_point(size=3, color='firebrick') +
theme_minimal() + xlab(NULL) + ylab(NULL) + labs(title="Citation", caption="data from Google Scholar")
ggsave(p, file="docs/citation.png", width=8, height=4)
```
<img src="docs/citation.png" width="890"/>
### Download stats
`r badge_download_bioc("ggtree")`
`r badge_bioc_download("ggtree", "total", "blue")`
`r badge_bioc_download("ggtree", "month", "blue")`
```{r echo=F, message=F, comment=NA}
x <- dlstats::bioc_stats("ggtree")
x <- x[-nrow(x), ] # last month data is not complete
## txtplot(ggtree::Date2decimal(x$end), x$Nb_of_downloads, width=100, height=25)
p <- ggplot(x, aes(end, Nb_of_distinct_IPs)) + geom_point() + geom_line() +
theme_minimal() +xlab(NULL) + ylab(NULL) +
labs(title="ggtree", subtitle="Monthly download stats (distinct IPs)", caption="data from Bioconductor")
ggsave(p, file="docs/dlstats.png", width=8, height=4)
```
<img src="docs/dlstats.png" width="890"/>
## Contributors
This project exists thanks to all the people who contribute. [[Contribute]](CONTRIBUTING.md).
<a href="https://github.com/GuangchuangYu/ggtree/graphs/contributors"><img src="https://opencollective.com/ggtree/contributors.svg?width=890" /></a>
## Backers
Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/ggtree#backer)]
<a href="https://opencollective.com/ggtree#backers" target="_blank"><img src="https://opencollective.com/ggtree/backers.svg?width=890"></a>
## Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/ggtree#sponsor)]
<a href="https://opencollective.com/ggtree/sponsor/0/website" target="_blank"><img src="https://opencollective.com/ggtree/sponsor/0/avatar.svg"></a>
<a href="https://opencollective.com/ggtree/sponsor/1/website" target="_blank"><img src="https://opencollective.com/ggtree/sponsor/1/avatar.svg"></a>
<a href="https://opencollective.com/ggtree/sponsor/2/website" target="_blank"><img src="https://opencollective.com/ggtree/sponsor/2/avatar.svg"></a>
<a href="https://opencollective.com/ggtree/sponsor/3/website" target="_blank"><img src="https://opencollective.com/ggtree/sponsor/3/avatar.svg"></a>
<a href="https://opencollective.com/ggtree/sponsor/4/website" target="_blank"><img src="https://opencollective.com/ggtree/sponsor/4/avatar.svg"></a>
<a href="https://opencollective.com/ggtree/sponsor/5/website" target="_blank"><img src="https://opencollective.com/ggtree/sponsor/5/avatar.svg"></a>
<a href="https://opencollective.com/ggtree/sponsor/6/website" target="_blank"><img src="https://opencollective.com/ggtree/sponsor/6/avatar.svg"></a>
<a href="https://opencollective.com/ggtree/sponsor/7/website" target="_blank"><img src="https://opencollective.com/ggtree/sponsor/7/avatar.svg"></a>
<a href="https://opencollective.com/ggtree/sponsor/8/website" target="_blank"><img src="https://opencollective.com/ggtree/sponsor/8/avatar.svg"></a>
<a href="https://opencollective.com/ggtree/sponsor/9/website" target="_blank"><img src="https://opencollective.com/ggtree/sponsor/9/avatar.svg"></a>