Browse code

Commit made by the Bioconductor Git-SVN bridge. Consists of 1 commit.

Commit information:

Commit id: 18a66e1235d3c9b4135d6dd1c0a862ac523260c0

legend

Committed by: GuangchuangYu
Author Name: GuangchuangYu
Commit date: 2015-02-09 17:46:03 +0800
Author date: 2015-02-09 17:46:03 +0800


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

g.yu authored on 09/02/2015 09:46:28
Showing 3 changed files

... ...
@@ -1,7 +1,7 @@
1 1
 Package: ggtree
2 2
 Type: Package
3 3
 Title: a phylogenetic tree viewer for different types of tree annotations
4
-Version: 0.99.13
4
+Version: 0.99.14
5 5
 Author: Guangchuang Yu
6 6
 Maintainer: Guangchuang Yu <guangchuangyu@gmail.com>
7 7
 Description: ggtree extends the ggplot2 plotting system which implemented the
... ...
@@ -1,3 +1,7 @@
1
+CHANGES IN VERSION 0.99.14
2
+------------------------
3
+ o add example in groupOTU for adding legend manually <2015-02-09, Mon>.
4
+
1 5
 CHANGES IN VERSION 0.99.13
2 6
 ------------------------
3 7
  o two dimensional tree <2015-02-06, Fri>
... ...
@@ -576,7 +576,9 @@ cls_ind <- groupOTU(tree, cls)
576 576
 library("colorspace")
577 577
 cols <- rainbow_hcl(4)
578 578
 cols <- c("black", cols)
579
-ggtree(tree, color=cols[cls_ind]) + geom_text(aes(label=label), color=cols[cls_ind], hjust=-.25)
579
+ggtree(tree, color=cols[cls_ind]) + geom_text(aes(label=label), color=cols[cls_ind], hjust=-.25) +
580
+    annotate("point", x=1, y=seq(12, 14, length.out=4), color=rev(cols[2:5]), size=6) +
581
+                 annotate("text", x=4, y=seq(12,14, length.out=4), label=rev(names(cls)))
580 582
 ```
581 583
 
582 584
 We can change the linetype either:
... ...
@@ -695,4 +697,4 @@ sessionInfo()
695 697
 ```
696 698
 
697 699
 
698
-# References
699 700
\ No newline at end of file
701
+# References