Browse code

emoji supported

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

Guangchuang Yu authored on 16/02/2017 07:35:52
Showing17 changed files

... ...
@@ -1,3 +1,8 @@
1
+Hugo Gruson
2
+-----------
3
++  Add legend transparency to `theme_transparent`
4
+   - <https://github.com/GuangchuangYu/ggtree/pull/112>
5
+
1 6
 Justin Silverman
2 7
 ----------------
3 8
 + `geom_balance`
... ...
@@ -5,7 +5,8 @@ Version: 1.7.7
5 5
 Authors@R: c(
6 6
 	   person("Guangchuang", "Yu", email = "guangchuangyu@gmail.com", role = c("aut", "cre", "cph")),
7 7
 	   person("Tommy Tsan-Yuk", "Lam", email = "tylam.tommy@gmail.com", rol = c("aut", "ths")),
8
-	   person("Justin", "Silverman", email = "jsilve24@gmail.com", rol = "ctb")
8
+	   person("Justin", "Silverman", email = "jsilve24@gmail.com", rol = "ctb"),
9
+	   person("Hugo", "Gruson", email = "hugo.gruson@normalesup.org", rol = "ctb")
9 10
 	   )
10 11
 Maintainer: Guangchuang Yu <guangchuangyu@gmail.com>
11 12
 Description: 'ggtree' extends the 'ggplot2' plotting system which implemented the grammar of graphics.
... ...
@@ -56,6 +56,7 @@ mdfiles:
56 56
 	Rscript -e 'library(ypages); gendoc("src/index.md", "blue", "docs/index.md")';\
57 57
 	Rscript -e 'library(ypages); gendoc("src/documentation.md", "blue", "docs/documentation.md")';\
58 58
 	Rscript -e 'library(ypages); gendoc("src/featuredArticles.md", "blue", "docs/featuredArticles.md")';\
59
+	Rscript -e 'library(ypages); gendoc("src/gallery.md", "blue", "docs/gallery.md")';\
59 60
 	Rscript -e 'library(ypages); gendoc("src/faq.md", "blue", "docs/faq.md")';\
60 61
 	cd docs;\
61 62
 	ln -f -s ../mysoftware/* ./
... ...
@@ -1,7 +1,11 @@
1 1
 CHANGES IN VERSION 1.7.7
2 2
 ------------------------
3
+ o supports parse="emoji" in geom_cladelabel, geom_text2, geom_label2, geom_tiplab, geom_tiplab2 <2017-02-16, Thu>
4
+ o aes(subset) now support logical vector contains NA <2017-02-16, Thu>
5
+ o add legend transparency to theme_transparent <2017-02-13, Mon>
6
+   + <https://github.com/GuangchuangYu/ggtree/pull/112>
3 7
  o update citation info <2017-01-20, Fri>
4
- 
8
+
5 9
 CHANGES IN VERSION 1.7.6
6 10
 ------------------------
7 11
  o inset support reverse scale <2017-01-05, Thu>
... ...
@@ -1,9 +1,9 @@
1 1
 
2 2
 
3
-##' return a data.frame that contains position information 
3
+##' return a data.frame that contains position information
4 4
 ##' for labeling column names of heatmap produced by `gheatmap` function
5 5
 ##'
6
-##' 
6
+##'
7 7
 ##' @title get_heatmap_column_position
8 8
 ##' @param treeview output of `gheatmap`
9 9
 ##' @param by one of 'bottom' or 'top'
... ...
@@ -29,7 +29,7 @@ get_heatmap_column_position <- function(treeview, by="bottom") {
29 29
 
30 30
 ##' scale x for tree with heatmap
31 31
 ##'
32
-##' 
32
+##'
33 33
 ##' @title scale_x_ggtree
34 34
 ##' @param tree_view tree view
35 35
 ##' @param breaks breaks for tree
... ...
@@ -59,16 +59,16 @@ scale_x_ggtree <- function(tree_view, breaks=NULL, labels=NULL) {
59 59
     } else {
60 60
         to <- m$to
61 61
     }
62
-    
62
+
63 63
     idx <- which(sapply(breaks, function(x) any(x > m$to)))
64 64
     if (length(idx)) {
65 65
         breaks <- breaks[-idx]
66 66
     }
67
-    
67
+
68 68
     if (is.null(labels)) {
69 69
         labels <- breaks
70 70
     }
71
-    
71
+
72 72
     breaks <- c(breaks, to)
73 73
     labels <- c(labels, gsub("\\.", "", as.character(m$from)))
74 74
 
... ...
@@ -77,7 +77,7 @@ scale_x_ggtree <- function(tree_view, breaks=NULL, labels=NULL) {
77 77
     } else {
78 78
         p <- p + scale_x_continuous(breaks=breaks, labels=labels)
79 79
     }
80
-    return(p)    
80
+    return(p)
81 81
 }
82 82
 
83 83
 
... ...
@@ -134,37 +134,37 @@ scale_x_ggtree <- function(tree_view, breaks=NULL, labels=NULL) {
134 134
 ##     ## p <- p+geom_segment(aes(x=x*1.02, xend=max(x)*1.08, yend=y), subset=.(isTip), linetype="dashed", size=0.4)
135 135
 ##     df=p$data
136 136
 ##     df=df[df$isTip,]
137
-    
137
+
138 138
 ##     dd$Var1 <- factor(dd$Var1, levels = df$label[order(df$y)])
139 139
 ##     if (any(dd$value == "")) {
140 140
 ##         dd$value[dd$value == ""] <- NA
141 141
 ##     }
142
-    
142
+
143 143
 ##     p2 <- ggplot(dd, aes(Var2, Var1, fill=value))+geom_tile(color=color)
144 144
 ##     if (is(dd$value,"numeric")) {
145 145
 ##         p2 <- p2 + scale_fill_gradient(low=low, high=high, na.value="white")
146 146
 ##     } else {
147 147
 ##         p2 <- p2 + scale_fill_discrete(na.value="white")
148 148
 ##     }
149
-    
149
+
150 150
 ##     p2 <- p2+xlab("")+ylab("")
151 151
 ##     p2 <- p2+theme_tree2() + theme(axis.ticks.x = element_blank(),
152 152
 ##                                    axis.line.x=element_blank())
153 153
 ##     ## p1 <- p1 + theme(axis.text.x = element_text(size = font.size))
154
-##     p2 <- p2 + theme(axis.ticks.margin = unit(0, "lines")) 
154
+##     p2 <- p2 + theme(axis.ticks.margin = unit(0, "lines"))
155 155
 ##     p2 <- p2 + theme(axis.text.x = element_text(size = font.size))
156 156
 ##     ## p2 <- p2 + theme(axis.text.y = element_text(size=font.size))
157
-    
158
-##     ## plot.margin   margin around entire plot (unit with the sizes of the top, right, bottom, and left margins) 
157
+
158
+##     ## plot.margin   margin around entire plot (unit with the sizes of the top, right, bottom, and left margins)
159 159
 ##     ## units can be given in "lines" or  something more specific like "cm"...
160 160
 
161
-    
161
+
162 162
 ##     p2 <- p2 + theme(panel.margin=unit(0, "null"))
163 163
 ##     p2 <- p2 + theme(plot.margin = unit(c(1, 1, .5, -0.5), "lines"))
164 164
 ##     p2 <- p2 + theme(legend.position = "right")
165 165
 ##     p2 <- p2 + guides(fill = guide_legend(override.aes = list(colour = NULL)))
166 166
 ##     ## p2 <- p2 + labs(fill="")
167
-    
167
+
168 168
 ##     return(p2)
169 169
 ## }
170 170
 
... ...
@@ -185,7 +185,7 @@ coplot <- function(tree1, tree2, hjust=0) {
185 185
         geom_tree(layout="phylogram", subset=.(tree=="A")) +
186 186
             geom_tree(layout="phylogram", subset=.(tree=="B")) +
187 187
                 theme_tree()
188
- 
188
+
189 189
     p <- p  + geom_text(aes(label=label),
190 190
                         subset=.(isTip & tree == "A"),
191 191
                         hjust=-offset/40) +
... ...
@@ -47,6 +47,13 @@ geom_cladelabel <- function(node, label, offset=0, offset.text=0,
47 47
         }
48 48
     }
49 49
 
50
+    if (parse == 'emoji') {
51
+        emoji <- get_fun_from_pkg("emojifont", "emoji")
52
+        label <- emoji(label)
53
+        parse <- FALSE
54
+        family <- "OpenSansEmoji"
55
+    }
56
+
50 57
     if (is.null(color)) {
51 58
         if (geom == "text") {
52 59
             ## no fill parameter
... ...
@@ -6,6 +6,7 @@
6 6
 ##' @param data A layer specific dataset -
7 7
 ##'             only needed if you want to override he plot defaults.
8 8
 ##' @param ... other arguments passed on to 'layer'
9
+##' @param family sans by default, can be any supported font
9 10
 ##' @param parse if TRUE, the labels will be passd into expressions
10 11
 ##' @param nudge_x horizontal adjustment
11 12
 ##' @param nudge_y vertical adjustment
... ...
@@ -24,6 +25,7 @@
24 25
 ##' @author Guangchuang Yu
25 26
 geom_label2 <- function(mapping = NULL, data = NULL,
26 27
                         ...,
28
+                        family = "sans",
27 29
                         parse = FALSE,
28 30
                         nudge_x = 0,
29 31
                         nudge_y = 0,
... ...
@@ -51,6 +53,15 @@ geom_label2 <- function(mapping = NULL, data = NULL,
51 53
         mapping <- modifyList(mapping, default_aes)
52 54
     }
53 55
 
56
+    if (parse == "emoji") {
57
+        label_aes <- aes_string(label=paste0("suppressMessages(emoji(", as.list(mapping)$label,"))"))
58
+        mapping <- modifyList(mapping, label_aes)
59
+        emoji <- get_fun_from_pkg("emojifont", "emoji")
60
+        parse <- FALSE
61
+        family <- "OpenSansEmoji"
62
+    }
63
+
64
+
54 65
     layer(
55 66
         data = data,
56 67
         mapping = mapping,
... ...
@@ -61,6 +72,7 @@ geom_label2 <- function(mapping = NULL, data = NULL,
61 72
         inherit.aes = inherit.aes,
62 73
         params = list(
63 74
             parse = parse,
75
+            family = family,
64 76
             label.padding = label.padding,
65 77
             label.r = label.r,
66 78
             label.size = label.size,
... ...
@@ -78,7 +90,7 @@ GeomLabelGGtree <- ggproto("GeomLabelGGtree", GeomLabel,
78 90
                            setup_data = function(data, params) {
79 91
                                if (is.null(data$subset))
80 92
                                    return(data)
81
-                               data[data$subset,]
93
+                               data[which(data$subset),]
82 94
                            },
83 95
                            draw_panel = function(self, data, panel_scales, coord, parse = FALSE,
84 96
                                                  na.rm = FALSE,
... ...
@@ -137,7 +137,7 @@ GeomPointGGtree <- ggproto("GeomPointGGtree", GeomPoint,
137 137
                            setup_data = function(data, params) {
138 138
                                if (is.null(data$subset))
139 139
                                    return(data)
140
-                               data[data$subset,]
140
+                               data[which(data$subset),]
141 141
                            }
142 142
 
143 143
                            ## ,
... ...
@@ -78,7 +78,7 @@ GeomSegmentGGtree <- ggproto("GeomSegmentGGtree", GeomSegment,
78 78
                              setup_data = function(data, params) {
79 79
                                  if (is.null(data$subset))
80 80
                                      return(data)
81
-                                 data[data$subset,]
81
+                                 data[which(data$subset),]
82 82
                              },
83 83
 
84 84
                              draw_panel = function(data, panel_scales, coord, arrow = NULL,
... ...
@@ -6,6 +6,7 @@
6 6
 ##' @param data A layer specific dataset -
7 7
 ##'             only needed if you want to override he plot defaults.
8 8
 ##' @param position The position adjustment to use for overlapping points on this layer
9
+##' @param family sans by default, can be any supported font
9 10
 ##' @param parse if TRUE, the labels will be passd into expressions
10 11
 ##' @param na.rm logical
11 12
 ##' @param show.legend logical
... ...
@@ -17,13 +18,14 @@
17 18
 ##' @return text layer
18 19
 ##' @importFrom ggplot2 layer
19 20
 ##' @importFrom ggplot2 position_nudge
21
+##' @importFrom ggplot2 aes_string
20 22
 ##' @export
21 23
 ##' @seealso
22 24
 ##' \link[ggplot2]{geom_text}
23 25
 ##' @author Guangchuang Yu
24 26
 geom_text2 <- function(mapping = NULL, data = NULL,
25
-                       position = "identity", parse = FALSE, na.rm=TRUE, show.legend = NA,
26
-                       inherit.aes = TRUE,
27
+                       position = "identity", family="sans", parse = FALSE,
28
+                       na.rm=TRUE, show.legend = NA, inherit.aes = TRUE,
27 29
                        ..., nudge_x = 0, nudge_y = 0, check_overlap = FALSE) {
28 30
 
29 31
     if (!missing(nudge_x) || !missing(nudge_y)) {
... ...
@@ -41,6 +43,14 @@ geom_text2 <- function(mapping = NULL, data = NULL,
41 43
         mapping <- modifyList(mapping, default_aes)
42 44
     }
43 45
 
46
+    if (parse == "emoji") {
47
+        label_aes <- aes_string(label=paste0("suppressMessages(emoji(", as.list(mapping)$label,"))"))
48
+        mapping <- modifyList(mapping, label_aes)
49
+        emoji <- get_fun_from_pkg("emojifont", "emoji")
50
+        parse <- FALSE
51
+        family <- "OpenSansEmoji"
52
+    }
53
+
44 54
     layer(
45 55
         data = data,
46 56
         mapping = mapping,
... ...
@@ -50,10 +60,11 @@ geom_text2 <- function(mapping = NULL, data = NULL,
50 60
         show.legend = show.legend,
51 61
         inherit.aes = inherit.aes,
52 62
         params = list(
53
-          parse = parse,
54
-          check_overlap = check_overlap,
55
-          na.rm = na.rm,
56
-          ...
63
+            parse = parse,
64
+            family = family,
65
+            check_overlap = check_overlap,
66
+            na.rm = na.rm,
67
+            ...
57 68
         ),
58 69
         check.aes = FALSE
59 70
     )
... ...
@@ -66,7 +77,7 @@ GeomTextGGtree <- ggproto("GeomTextGGtree", GeomText,
66 77
                           setup_data = function(data, params) {
67 78
                               if (is.null(data$subset))
68 79
                                   return(data)
69
-                              data[data$subset,]
80
+                              data[which(data$subset),] ## use `which` makes it compatible with NA
70 81
                           },
71 82
                           ## compute_group = function(data, params) {
72 83
                           ##     data
... ...
@@ -93,6 +93,12 @@ theme_transparent <- function(...) {
93 93
               colour = NA),
94 94
           plot.background = element_rect(
95 95
               fill = "transparent",
96
+              colour = NA),
97
+          legend.key = element_rect(
98
+              fill = "transparent", 
99
+              colour = NA),
100
+          legend.background = element_rect(
101
+              fill = "transparent", 
96 102
               colour = NA), ...)
97 103
 }
98 104
 
... ...
@@ -76,7 +76,16 @@ as.data.frame_ <- function(x, row.names, optional, branch.length = "branch.lengt
76 76
 }
77 77
 
78 78
 get_tree_data <- function(tree_object) {
79
-    tree_anno <- tree_object@data
79
+    if (is(tree_object, "codeml")) {
80
+        tree_anno <- tree_object@mlc@dNdS
81
+    } else if (is(tree_object, "codeml_mlc")) {
82
+        tree_anno <- tree_object@dNdS
83
+    } else if (is(tree_object, "beast")) {
84
+        tree_anno <- tree_object@stats
85
+    } else {
86
+        tree_anno <- tree_object@data
87
+    }
88
+
80 89
     if (has.extraInfo(tree_object)) {
81 90
         if (nrow(tree_anno) > 0) {
82 91
             tree_anno <- merge(tree_anno, tree_object@extraInfo, by="node")
... ...
@@ -834,15 +843,7 @@ set_branch_length <- function(tree_object, branch.length) {
834 843
         return(tree_object)
835 844
     }
836 845
 
837
-    if (is(tree_object, "codeml")) {
838
-        tree_anno <- tree_object@mlc@dNdS
839
-    } else if (is(tree_object, "codeml_mlc")) {
840
-        tree_anno <- tree_object@dNdS
841
-    } else if (is(tree_object, "beast")) {
842
-        tree_anno <- tree_object@stats
843
-    } else {
844
-        tree_anno <- get_tree_data(tree_object)
845
-    }
846
+    tree_anno <- get_tree_data(tree_object)
846 847
 
847 848
     phylo <- get.tree(tree_object)
848 849
 
... ...
@@ -68,7 +68,7 @@ For details, please visit our project website, <https://guangchuangyu.github.io/
68 68
 
69 69
 ```{r echo=F, comment=NA}
70 70
 d <- get_article_cite_history('DO5oG40AAAAJ', 'HtEfBTGE9r8C')
71
-txtplot(d$year, d$cites, xlim=c(2015, 2017))
71
+txtplot(d$year, d$cites)
72 72
 ```
73 73
 
74 74
 ### Download stats
... ...
@@ -2,9 +2,9 @@
2 2
 ggtree: an R package for visualization and annotation of phylogenetic trees with their covariates and other associated data
3 3
 ===========================================================================================================================
4 4
 
5
-[![releaseVersion](https://img.shields.io/badge/release%20version-1.6.7-green.svg?style=flat)](https://bioconductor.org/packages/ggtree) [![develVersion](https://img.shields.io/badge/devel%20version-1.7.7-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) [![total](https://img.shields.io/badge/downloads-20046/total-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree) [![month](https://img.shields.io/badge/downloads-1177/month-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree) <img src="logo.png" align="right" />
5
+[![releaseVersion](https://img.shields.io/badge/release%20version-1.6.9-green.svg?style=flat)](https://bioconductor.org/packages/ggtree) [![develVersion](https://img.shields.io/badge/devel%20version-1.7.7-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) [![total](https://img.shields.io/badge/downloads-21822/total-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree) [![month](https://img.shields.io/badge/downloads-1894/month-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree) <img src="logo.png" align="right" />
6 6
 
7
-[![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-2017--01--20-green.svg)](https://github.com/GuangchuangYu/ggtree/commits/master) [![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) [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://awesome-r.com/#awesome-r-graphic-displays)
7
+[![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-2017--02--16-green.svg)](https://github.com/GuangchuangYu/ggtree/commits/master) [![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) [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://awesome-r.com/#awesome-r-graphic-displays)
8 8
 
9 9
 [![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)
10 10
 
... ...
@@ -18,7 +18,7 @@ Please cite the following article when using `ggtree`:
18 18
 
19 19
 **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.
20 20
 
21
-[![doi](https://img.shields.io/badge/doi-10.1111/2041--210X.12628-green.svg?style=flat)](http://dx.doi.org/10.1111/2041-210X.12628) [![citation](https://img.shields.io/badge/cited%20by-1-green.svg?style=flat)](https://scholar.google.com.hk/scholar?oi=bibs&hl=en&cites=7268358477862164627) [![Altmetric](https://img.shields.io/badge/Altmetric-299-green.svg?style=flat)](https://www.altmetric.com/details/10533079)
21
+[![doi](https://img.shields.io/badge/doi-10.1111/2041--210X.12628-green.svg?style=flat)](http://dx.doi.org/10.1111/2041-210X.12628) [![citation](https://img.shields.io/badge/cited%20by-7-green.svg?style=flat)](https://scholar.google.com.hk/scholar?oi=bibs&hl=en&cites=7268358477862164627) [![Altmetric](https://img.shields.io/badge/Altmetric-351-green.svg?style=flat)](https://www.altmetric.com/details/10533079)
22 22
 
23 23
 ------------------------------------------------------------------------
24 24
 
... ...
@@ -31,50 +31,50 @@ For details, please visit our project website, <https://guangchuangyu.github.io/
31 31
 
32 32
 ### Citation
33 33
 
34
-[![citation](https://img.shields.io/badge/cited%20by-1-green.svg?style=flat)](https://scholar.google.com.hk/scholar?oi=bibs&hl=en&cites=7268358477862164627)
35
-
36
-        +-------------+------------+------------+-------------++
37
-        |                                                      |
38
-        |                                                      |
39
-    1.2 +                                                      +
40
-        |                                                      |
41
-        |                                                      |
42
-      1 +                          *                           +
43
-        |                                                      |
44
-        |                                                      |
45
-        |                                                      |
46
-    0.8 +                                                      +
47
-        |                                                      |
48
-        |                                                      |
49
-    0.6 +-------------+------------+------------+-------------++
50
-      2015         2015.5        2016        2016.5         2017
34
+[![citation](https://img.shields.io/badge/cited%20by-7-green.svg?style=flat)](https://scholar.google.com.hk/scholar?oi=bibs&hl=en&cites=7268358477862164627)
35
+
36
+      +--+---------+---------+---------+---------+---------+---+
37
+    6 +                                                    *   +
38
+      |                                                        |
39
+    5 +                                                        +
40
+      |                                                        |
41
+    4 +                                                        +
42
+      |                                                        |
43
+      |                                                        |
44
+    3 +                                                        +
45
+      |                                                        |
46
+    2 +                                                        +
47
+      |                                                        |
48
+    1 +  *                                                     +
49
+      +--+---------+---------+---------+---------+---------+---+
50
+       2016     2016.2    2016.4    2016.6    2016.8     2017   
51 51
 
52 52
 ### Download stats
53 53
 
54
-[![download](http://www.bioconductor.org/shields/downloads/ggtree.svg)](https://bioconductor.org/packages/stats/bioc/ggtree) [![total](https://img.shields.io/badge/downloads-20046/total-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree) [![month](https://img.shields.io/badge/downloads-1177/month-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree)
54
+[![download](http://www.bioconductor.org/shields/downloads/ggtree.svg)](https://bioconductor.org/packages/stats/bioc/ggtree) [![total](https://img.shields.io/badge/downloads-21822/total-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree) [![month](https://img.shields.io/badge/downloads-1894/month-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree)
55 55
 
56
-         ++---------------------+---------------------+---------------------+---------------------+----+
57
-         |                                                                                    *        |
56
+         ++--------------------+--------------------+--------------------+--------------------+--------+
57
+         |                                                                                        *    |
58
+         |                                                                                 *           |
58 59
          |                                                                                             |
59
-         |                                                                            *                |
60
-         |                                                                                *            |
61
-    1500 +                                                                                             +
60
+         |                                                                         *   *               |
62 61
          |                                                                                             |
62
+    1500 +                                                                                             +
63 63
          |                                                                                             |
64
-         |                                                                 *                           |
65
-         |                                                      *                  *              *    |
66
-         |                                                              *      *                       |
67
-    1000 +                                                          *                                  +
64
+         |                                                               *                             |
65
+         |                                                                                    *        |
66
+         |                                                    *             *   *                      |
67
+    1000 +                                                        *  *                                 +
68 68
          |                                                                                             |
69
-         |                                        *      *                                             |
70
-         |                                           *       *                                         |
71
-         |                                *   *                                                        |
69
+         |                                      *      *                                               |
70
+         |                                                 *                                           |
71
+         |                               *   *      *                                                  |
72 72
          |                                                                                             |
73
-     500 +                             *                                                               +
74
-         |                     *   *                                                                   |
75
-         |                  *                                                                          |
73
+     500 +                            *                                                                +
74
+         |                     *  *                                                                    |
75
+         |                 *                                                                           |
76 76
          |              *                                                                              |
77 77
          |                                                                                             |
78
-       0 +   *   *  *                                                                                  +
79
-         ++---------------------+---------------------+---------------------+---------------------+----+
80
-        2015                 2015.5                 2016                 2016.5                 2017
78
+       0 +   *  *   *                                                                                  +
79
+         ++--------------------+--------------------+--------------------+--------------------+--------+
80
+        2015                2015.5                2016                2016.5                2017
... ...
@@ -4,10 +4,10 @@
4 4
 \alias{geom_label2}
5 5
 \title{geom_text2}
6 6
 \usage{
7
-geom_label2(mapping = NULL, data = NULL, ..., parse = FALSE,
8
-  nudge_x = 0, nudge_y = 0, label.padding = unit(0.25, "lines"),
9
-  label.r = unit(0.15, "lines"), label.size = 0.25, na.rm = TRUE,
10
-  show.legend = NA, inherit.aes = TRUE)
7
+geom_label2(mapping = NULL, data = NULL, ..., family = "sans",
8
+  parse = FALSE, nudge_x = 0, nudge_y = 0, label.padding = unit(0.25,
9
+  "lines"), label.r = unit(0.15, "lines"), label.size = 0.25,
10
+  na.rm = TRUE, show.legend = NA, inherit.aes = TRUE)
11 11
 }
12 12
 \arguments{
13 13
 \item{mapping}{the aesthetic mapping}
... ...
@@ -17,6 +17,8 @@ only needed if you want to override he plot defaults.}
17 17
 
18 18
 \item{...}{other arguments passed on to 'layer'}
19 19
 
20
+\item{family}{sans by default, can be any supported font}
21
+
20 22
 \item{parse}{if TRUE, the labels will be passd into expressions}
21 23
 
22 24
 \item{nudge_x}{horizontal adjustment}
... ...
@@ -5,8 +5,9 @@
5 5
 \title{geom_text2}
6 6
 \usage{
7 7
 geom_text2(mapping = NULL, data = NULL, position = "identity",
8
-  parse = FALSE, na.rm = TRUE, show.legend = NA, inherit.aes = TRUE,
9
-  ..., nudge_x = 0, nudge_y = 0, check_overlap = FALSE)
8
+  family = "sans", parse = FALSE, na.rm = TRUE, show.legend = NA,
9
+  inherit.aes = TRUE, ..., nudge_x = 0, nudge_y = 0,
10
+  check_overlap = FALSE)
10 11
 }
11 12
 \arguments{
12 13
 \item{mapping}{the aesthetic mapping}
... ...
@@ -16,6 +17,8 @@ only needed if you want to override he plot defaults.}
16 17
 
17 18
 \item{position}{The position adjustment to use for overlapping points on this layer}
18 19
 
20
+\item{family}{sans by default, can be any supported font}
21
+
19 22
 \item{parse}{if TRUE, the labels will be passd into expressions}
20 23
 
21 24
 \item{na.rm}{logical}
... ...
@@ -15,7 +15,7 @@ get_heatmap_column_position(treeview, by = "bottom")
15 15
 data.frame
16 16
 }
17 17
 \description{
18
-return a data.frame that contains position information 
18
+return a data.frame that contains position information
19 19
 for labeling column names of heatmap produced by `gheatmap` function
20 20
 }
21 21
 \author{