Browse code

bug fixed in geom_treescale

git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/ggtree@120154 bc3139a8-67e5-0310-9ffc-ced21a209358

g.yu authored on 16/08/2016 04:18:17
Showing 4 changed files

... ...
@@ -1,7 +1,7 @@
1 1
 Package: ggtree
2 2
 Type: Package
3 3
 Title: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data
4
-Version: 1.5.9
4
+Version: 1.5.10
5 5
 Author: Guangchuang Yu and Tommy Tsan-Yuk Lam
6 6
 Maintainer: Guangchuang Yu <guangchuangyu@gmail.com>
7 7
 Description: 'ggtree' extends the 'ggplot2' plotting system which implemented the grammar of graphics.
... ...
@@ -1,3 +1,8 @@
1
+CHANGES IN VERSION 1.5.10
2
+------------------------
3
+ o fixed issue #72 for label of geom_treescale not displayed <2016-08-16, Tue>
4
+   + https://github.com/GuangchuangYu/ggtree/issues/72
5
+ 
1 6
 CHANGES IN VERSION 1.5.9
2 7
 ------------------------
3 8
  o update citation info <2016-08-12, Fri>
... ...
@@ -19,7 +19,7 @@ geom_treescale <- function(x=NULL, y=NULL, width=NULL, offset=NULL, color="black
19 19
     data=NULL
20 20
     position="identity"
21 21
     show.legend=NA
22
-    na.rm=FALSE
22
+    na.rm=TRUE
23 23
     inherit.aes=FALSE
24 24
 
25 25
     default_aes <- aes_(x=~x, y=~y)
... ...
@@ -74,7 +74,7 @@ stat_treeScaleText <- function(mapping=NULL, data=NULL,
74 74
                                xx, yy, width, offset, color, ...,
75 75
                                show.legend=NA, inherit.aes=TRUE, na.rm=FALSE) {
76 76
 
77
-    default_aes <- aes_(x=~x, y=~y, label=~label)
77
+    default_aes <- aes_(x=~x, y=~y, label=~x)
78 78
     if (is.null(mapping)) {
79 79
         mapping <- default_aes
80 80
     } else {
... ...
@@ -149,9 +149,9 @@ get_treescale_position <- function(data, xx, yy, width, offset=NULL) {
149 149
          TextPosition=data.frame(x=x+d/2, y=y+offset, label=d))
150 150
 }
151 151
 
152
-##' add evolution distance legend
153
-##'
154
-##' 
152
+## ##' add evolution distance legend
153
+## ##'
154
+## ##' 
155 155
 ## ##' @title add_legend
156 156
 ## ##' @param p tree view
157 157
 ## ##' @param width width of legend
... ...
@@ -3,9 +3,9 @@ ggtree: an R package for visualization and annotation of phylogenetic trees with
3 3
 
4 4
 [![platform](http://www.bioconductor.org/shields/availability/devel/ggtree.svg)](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#archives) [![Build Status](http://www.bioconductor.org/shields/build/devel/bioc/ggtree.svg)](https://bioconductor.org/checkResults/devel/bioc-LATEST/ggtree/) [![Linux/Mac Travis Build Status](https://img.shields.io/travis/GuangchuangYu/ggtree/master.svg?label=Mac%20OSX%20%26%20Linux)](https://travis-ci.org/GuangchuangYu/ggtree) [![AppVeyor Build Status](https://img.shields.io/appveyor/ci/Guangchuangyu/ggtree/master.svg?label=Windows)](https://ci.appveyor.com/project/GuangchuangYu/ggtree) [![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-green.svg?style=flat)](http://bioconda.github.io/recipes/bioconductor-ggtree/README.html)
5 5
 
6
-[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) [![codecov](https://codecov.io/gh/GuangchuangYu/ggtree/branch/master/graph/badge.svg)](https://codecov.io/gh/GuangchuangYu/ggtree) [![Last-changedate](https://img.shields.io/badge/last%20change-2016--08--12-green.svg)](https://github.com/GuangchuangYu/ggtree/commits/master) [![commit](http://www.bioconductor.org/shields/commits/bioc/ggtree.svg)](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#svn_source) [![GitHub forks](https://img.shields.io/github/forks/GuangchuangYu/ggtree.svg)](https://github.com/GuangchuangYu/ggtree/network) [![GitHub stars](https://img.shields.io/github/stars/GuangchuangYu/ggtree.svg)](https://github.com/GuangchuangYu/ggtree/stargazers)
6
+[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) [![codecov](https://codecov.io/gh/GuangchuangYu/ggtree/branch/master/graph/badge.svg)](https://codecov.io/gh/GuangchuangYu/ggtree) [![Last-changedate](https://img.shields.io/badge/last%20change-2016--08--16-green.svg)](https://github.com/GuangchuangYu/ggtree/commits/master) [![commit](http://www.bioconductor.org/shields/commits/bioc/ggtree.svg)](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#svn_source) [![GitHub forks](https://img.shields.io/github/forks/GuangchuangYu/ggtree.svg)](https://github.com/GuangchuangYu/ggtree/network) [![GitHub stars](https://img.shields.io/github/stars/GuangchuangYu/ggtree.svg)](https://github.com/GuangchuangYu/ggtree/stargazers)
7 7
 
8
-[![releaseVersion](https://img.shields.io/badge/release%20version-1.4.14-green.svg?style=flat)](https://bioconductor.org/packages/ggtree) [![develVersion](https://img.shields.io/badge/devel%20version-1.5.9-green.svg?style=flat)](https://github.com/GuangchuangYu/ggtree) [![Bioc](http://www.bioconductor.org/shields/years-in-bioc/ggtree.svg)](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#since) [![post](http://www.bioconductor.org/shields/posts/ggtree.svg)](https://support.bioconductor.org/t/ggtree/) [![download](http://www.bioconductor.org/shields/downloads/ggtree.svg)](https://bioconductor.org/packages/stats/bioc/ggtree/)
8
+[![releaseVersion](https://img.shields.io/badge/release%20version-1.4.16-green.svg?style=flat)](https://bioconductor.org/packages/ggtree) [![develVersion](https://img.shields.io/badge/devel%20version-1.5.10-green.svg?style=flat)](https://github.com/GuangchuangYu/ggtree) [![Bioc](http://www.bioconductor.org/shields/years-in-bioc/ggtree.svg)](https://www.bioconductor.org/packages/devel/bioc/html/ggtree.html#since) [![post](http://www.bioconductor.org/shields/posts/ggtree.svg)](https://support.bioconductor.org/t/ggtree/) [![download](http://www.bioconductor.org/shields/downloads/ggtree.svg)](https://bioconductor.org/packages/stats/bioc/ggtree/)
9 9
 
10 10
 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.
11 11
 
... ...
@@ -28,7 +28,7 @@ For details, please visit our project website, <https://guangchuangyu.github.io/
28 28
 
29 29
 ### Download stats
30 30
 
31
-[![download](http://www.bioconductor.org/shields/downloads/ggtree.svg)](https://bioconductor.org/packages/stats/bioc/ggtree/) [![total](https://img.shields.io/badge/downloads-11940/total-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree/) [![month](https://img.shields.io/badge/downloads-1091/month-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree/)
31
+[![download](http://www.bioconductor.org/shields/downloads/ggtree.svg)](https://bioconductor.org/packages/stats/bioc/ggtree/) [![total](https://img.shields.io/badge/downloads-12041/total-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree/) [![month](https://img.shields.io/badge/downloads-1091/month-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree/)
32 32
 
33 33
          +---------------------------+---------------------------+----------------------------+--------+
34 34
          |                                                                                    *        |