... | ... |
@@ -1,5 +1,6 @@ |
1 | 1 |
CHANGES IN VERSION 1.9.4 |
2 | 2 |
------------------------ |
3 |
+ o set_hilight_legend <2017-08-30, Wed> |
|
3 | 4 |
o geom_motif for aligned motif <2017-08-22, Tue> |
4 | 5 |
+ https://github.com/GuangchuangYu/ggtree/issues/148 |
5 | 6 |
o fixed `R CMD build` error: cannot stat 'ggtree/site_src/themes': No such file or directory <2017-08-22, Tue> |
... | ... |
@@ -260,4 +260,18 @@ coplot <- function(tree1, tree2, hjust=0) { |
260 | 260 |
|
261 | 261 |
|
262 | 262 |
|
263 |
- |
|
263 |
+##' set legend for multiple geom_hilight layers |
|
264 |
+##' |
|
265 |
+##' |
|
266 |
+##' @title set_hilight_legend |
|
267 |
+##' @param p ggtree object |
|
268 |
+##' @param color color vector |
|
269 |
+##' @param label label vector |
|
270 |
+##' @return updated ggtree object |
|
271 |
+##' @export |
|
272 |
+##' @author guangchuang yu |
|
273 |
+set_hilight_legend <- function(p, color, label) { |
|
274 |
+ d <- data.frame(color=color, clade=label, x=0, y=1) |
|
275 |
+ p <- p + geom_rect(aes_(fill=~clade, xmin=~x, xmax=~x, ymin=~y, ymax=~y), data=d, inherit.aes=F) + |
|
276 |
+ guides(fill=guide_legend(override.aes=list(fill=d$color))) |
|
277 |
+} |
... | ... |
@@ -4,9 +4,9 @@ ggtree: an R package for visualization and annotation of phylogenetic trees with |
4 | 4 |
|
5 | 5 |
<img src="https://raw.githubusercontent.com/Bioconductor/BiocStickers/master/ggtree/ggtree.png" height="200" align="right" /> |
6 | 6 |
|
7 |
-[](https://bioconductor.org/packages/ggtree) [](https://github.com/guangchuangyu/ggtree) [](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#since) [](https://bioconductor.org/packages/stats/bioc/ggtree) [](https://bioconductor.org/packages/stats/bioc/ggtree) |
|
7 |
+[](https://bioconductor.org/packages/ggtree) [](https://github.com/guangchuangyu/ggtree) [](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#since) [](https://bioconductor.org/packages/stats/bioc/ggtree) [](https://bioconductor.org/packages/stats/bioc/ggtree) |
|
8 | 8 |
|
9 |
-[](http://www.repostatus.org/#active) [](https://codecov.io/gh/GuangchuangYu/ggtree) [](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) |
|
9 |
+[](http://www.repostatus.org/#active) [](https://codecov.io/gh/GuangchuangYu/ggtree) [](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) |
|
10 | 10 |
|
11 | 11 |
[](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) |
12 | 12 |
|
... | ... |
@@ -27,7 +27,7 @@ Please cite the following article when using `ggtree`: |
27 | 27 |
|
28 | 28 |
**G Yu**, DK Smith, H Zhu, Y Guan, TTY Lam<sup>\*</sup>. 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. |
29 | 29 |
|
30 |
-[](http://dx.doi.org/10.1111/2041-210X.12628) [](https://www.altmetric.com/details/10533079) [](https://scholar.google.com.hk/scholar?oi=bibs&hl=en&cites=7268358477862164627) |
|
30 |
+[](http://dx.doi.org/10.1111/2041-210X.12628) [](https://www.altmetric.com/details/10533079) [](https://scholar.google.com.hk/scholar?oi=bibs&hl=en&cites=7268358477862164627) |
|
31 | 31 |
|
32 | 32 |
------------------------------------------------------------------------ |
33 | 33 |
|
... | ... |
@@ -37,7 +37,7 @@ Please cite the following article when using `ggtree`: |
37 | 37 |
|
38 | 38 |
### Download stats |
39 | 39 |
|
40 |
-[](https://bioconductor.org/packages/stats/bioc/ggtree) [](https://bioconductor.org/packages/stats/bioc/ggtree) [](https://bioconductor.org/packages/stats/bioc/ggtree) |
|
40 |
+[](https://bioconductor.org/packages/stats/bioc/ggtree) [](https://bioconductor.org/packages/stats/bioc/ggtree) [](https://bioconductor.org/packages/stats/bioc/ggtree) |
|
41 | 41 |
|
42 | 42 |
<img src="docs/images/dlstats.png" width="890"/> |
43 | 43 |
|
... | ... |
@@ -345,7 +345,7 @@ |
345 | 345 |
|
346 | 346 |
<p><link rel="stylesheet" href="https://guangchuangyu.github.io/css/font-awesome.min.css"> <link rel="stylesheet" href="https://guangchuangyu.github.io/css/academicons.min.css"></p> |
347 | 347 |
<p><img src="https://raw.githubusercontent.com/Bioconductor/BiocStickers/master/ggtree/ggtree.png" height="200" align="right" /></p> |
348 |
-<p><a href="https://bioconductor.org/packages/ggtree"><img src="https://img.shields.io/badge/release%20version-1.8.2-blue.svg?style=flat" alt="releaseVersion" /></a> <a href="https://github.com/guangchuangyu/ggtree"><img src="https://img.shields.io/badge/devel%20version-1.9.3-blue.svg?style=flat" alt="develVersion" /></a> <a href="https://bioconductor.org/packages/stats/bioc/ggtree"><img src="https://img.shields.io/badge/downloads-18100/total-blue.svg?style=flat" alt="total" /></a> <a href="https://bioconductor.org/packages/stats/bioc/ggtree"><img src="https://img.shields.io/badge/downloads-834/month-blue.svg?style=flat" alt="month" /></a></p> |
|
348 |
+<p><a href="https://bioconductor.org/packages/ggtree"><img src="https://img.shields.io/badge/release%20version-1.8.2-blue.svg?style=flat" alt="releaseVersion" /></a> <a href="https://github.com/guangchuangyu/ggtree"><img src="https://img.shields.io/badge/devel%20version-1.9.4-blue.svg?style=flat" alt="develVersion" /></a> <a href="https://bioconductor.org/packages/stats/bioc/ggtree"><img src="https://img.shields.io/badge/downloads-18441/total-blue.svg?style=flat" alt="total" /></a> <a href="https://bioconductor.org/packages/stats/bioc/ggtree"><img src="https://img.shields.io/badge/downloads-834/month-blue.svg?style=flat" alt="month" /></a></p> |
|
349 | 349 |
<p>The <code>ggtree</code> package extending the <em>ggplot2</em> package. It based on grammar of graphics and takes all the good parts of <em>ggplot2</em>. <em>ggtree</em> is designed for not only viewing phylogenetic tree but also displaying annotation data on the tree. <em>ggtree</em> is released within the <a href="https://bioconductor.org/packages/ggtree/">Bioconductor</a> project and the source code is hosted on <a href="https://github.com/GuangchuangYu/ggtree"><i class="fa fa-github fa-lg"></i> GitHub</a>.</p> |
350 | 350 |
<div id="authors" class="section level2"> |
351 | 351 |
<h2><i class="fa fa-user"></i> Authors</h2> |
... | ... |
@@ -354,7 +354,7 @@ |
354 | 354 |
<div id="citation" class="section level2"> |
355 | 355 |
<h2><i class="fa fa-book"></i> Citation</h2> |
356 | 356 |
<p>Please cite the following article when using <code>ggtree</code>:</p> |
357 |
-<p><a href="http://dx.doi.org/10.1111/2041-210X.12628"><img src="https://img.shields.io/badge/doi-10.1111/2041--210X.12628-blue.svg?style=flat" alt="doi" /></a> <a href="https://www.altmetric.com/details/10533079"><img src="https://img.shields.io/badge/Altmetric-346-blue.svg?style=flat" alt="Altmetric" /></a> <a href="https://scholar.google.com.hk/scholar?oi=bibs&hl=en&cites=7268358477862164627"><img src="https://img.shields.io/badge/cited%20by-34-blue.svg?style=flat" alt="citation" /></a></p> |
|
357 |
+<p><a href="http://dx.doi.org/10.1111/2041-210X.12628"><img src="https://img.shields.io/badge/doi-10.1111/2041--210X.12628-blue.svg?style=flat" alt="doi" /></a> <a href="https://www.altmetric.com/details/10533079"><img src="https://img.shields.io/badge/Altmetric-346-blue.svg?style=flat" alt="Altmetric" /></a> <a href="https://scholar.google.com.hk/scholar?oi=bibs&hl=en&cites=7268358477862164627"><img src="https://img.shields.io/badge/cited%20by-35-blue.svg?style=flat" alt="citation" /></a></p> |
|
358 | 358 |
<p><strong>G Yu</strong>, DK Smith, H Zhu, Y Guan, TTY Lam<sup>*</sup>. ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data. <strong><em>Methods in Ecology and Evolution</em></strong>. 2017, 8(1):28-36.</p> |
359 | 359 |
</div> |
360 | 360 |
<div id="featured-articles" class="section level2"> |
361 | 361 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,24 @@ |
1 |
+% Generated by roxygen2: do not edit by hand |
|
2 |
+% Please edit documentation in R/experimental_function.R |
|
3 |
+\name{set_hilight_legend} |
|
4 |
+\alias{set_hilight_legend} |
|
5 |
+\title{set_hilight_legend} |
|
6 |
+\usage{ |
|
7 |
+set_hilight_legend(p, color, label) |
|
8 |
+} |
|
9 |
+\arguments{ |
|
10 |
+\item{p}{ggtree object} |
|
11 |
+ |
|
12 |
+\item{color}{color vector} |
|
13 |
+ |
|
14 |
+\item{label}{label vector} |
|
15 |
+} |
|
16 |
+\value{ |
|
17 |
+updated ggtree object |
|
18 |
+} |
|
19 |
+\description{ |
|
20 |
+set legend for multiple geom_hilight layers |
|
21 |
+} |
|
22 |
+\author{ |
|
23 |
+guangchuang yu |
|
24 |
+} |
... | ... |
@@ -9,7 +9,7 @@ weight: 1 |
9 | 9 |
|
10 | 10 |
<p><link rel="stylesheet" href="https://guangchuangyu.github.io/css/font-awesome.min.css"> <link rel="stylesheet" href="https://guangchuangyu.github.io/css/academicons.min.css"></p> |
11 | 11 |
<p><img src="https://raw.githubusercontent.com/Bioconductor/BiocStickers/master/ggtree/ggtree.png" height="200" align="right" /></p> |
12 |
-<p><a href="https://bioconductor.org/packages/ggtree"><img src="https://img.shields.io/badge/release%20version-1.8.2-blue.svg?style=flat" alt="releaseVersion" /></a> <a href="https://github.com/guangchuangyu/ggtree"><img src="https://img.shields.io/badge/devel%20version-1.9.3-blue.svg?style=flat" alt="develVersion" /></a> <a href="https://bioconductor.org/packages/stats/bioc/ggtree"><img src="https://img.shields.io/badge/downloads-18100/total-blue.svg?style=flat" alt="total" /></a> <a href="https://bioconductor.org/packages/stats/bioc/ggtree"><img src="https://img.shields.io/badge/downloads-834/month-blue.svg?style=flat" alt="month" /></a></p> |
|
12 |
+<p><a href="https://bioconductor.org/packages/ggtree"><img src="https://img.shields.io/badge/release%20version-1.8.2-blue.svg?style=flat" alt="releaseVersion" /></a> <a href="https://github.com/guangchuangyu/ggtree"><img src="https://img.shields.io/badge/devel%20version-1.9.4-blue.svg?style=flat" alt="develVersion" /></a> <a href="https://bioconductor.org/packages/stats/bioc/ggtree"><img src="https://img.shields.io/badge/downloads-18441/total-blue.svg?style=flat" alt="total" /></a> <a href="https://bioconductor.org/packages/stats/bioc/ggtree"><img src="https://img.shields.io/badge/downloads-834/month-blue.svg?style=flat" alt="month" /></a></p> |
|
13 | 13 |
<p>The <code>ggtree</code> package extending the <em>ggplot2</em> package. It based on grammar of graphics and takes all the good parts of <em>ggplot2</em>. <em>ggtree</em> is designed for not only viewing phylogenetic tree but also displaying annotation data on the tree. <em>ggtree</em> is released within the <a href="https://bioconductor.org/packages/ggtree/">Bioconductor</a> project and the source code is hosted on <a href="https://github.com/GuangchuangYu/ggtree"><i class="fa fa-github fa-lg"></i> GitHub</a>.</p> |
14 | 14 |
<div id="authors" class="section level2"> |
15 | 15 |
<h2><i class="fa fa-user"></i> Authors</h2> |
... | ... |
@@ -18,7 +18,7 @@ weight: 1 |
18 | 18 |
<div id="citation" class="section level2"> |
19 | 19 |
<h2><i class="fa fa-book"></i> Citation</h2> |
20 | 20 |
<p>Please cite the following article when using <code>ggtree</code>:</p> |
21 |
-<p><a href="http://dx.doi.org/10.1111/2041-210X.12628"><img src="https://img.shields.io/badge/doi-10.1111/2041--210X.12628-blue.svg?style=flat" alt="doi" /></a> <a href="https://www.altmetric.com/details/10533079"><img src="https://img.shields.io/badge/Altmetric-346-blue.svg?style=flat" alt="Altmetric" /></a> <a href="https://scholar.google.com.hk/scholar?oi=bibs&hl=en&cites=7268358477862164627"><img src="https://img.shields.io/badge/cited%20by-34-blue.svg?style=flat" alt="citation" /></a></p> |
|
21 |
+<p><a href="http://dx.doi.org/10.1111/2041-210X.12628"><img src="https://img.shields.io/badge/doi-10.1111/2041--210X.12628-blue.svg?style=flat" alt="doi" /></a> <a href="https://www.altmetric.com/details/10533079"><img src="https://img.shields.io/badge/Altmetric-346-blue.svg?style=flat" alt="Altmetric" /></a> <a href="https://scholar.google.com.hk/scholar?oi=bibs&hl=en&cites=7268358477862164627"><img src="https://img.shields.io/badge/cited%20by-35-blue.svg?style=flat" alt="citation" /></a></p> |
|
22 | 22 |
<p><strong>G Yu</strong>, DK Smith, H Zhu, Y Guan, TTY Lam<sup>*</sup>. ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data. <strong><em>Methods in Ecology and Evolution</em></strong>. 2017, 8(1):28-36.</p> |
23 | 23 |
</div> |
24 | 24 |
<div id="featured-articles" class="section level2"> |