Browse code

figure

guangchuang yu authored on 11/07/2017 13:01:26
Showing4 changed files

... ...
@@ -14,6 +14,8 @@ html_preview: false
14 14
 library("txtplot")
15 15
 library("badger")
16 16
 library("ypages")
17
+library("ggalt")
18
+library("ggplot2")
17 19
 ```
18 20
 
19 21
 <img src="https://raw.githubusercontent.com/Bioconductor/BiocStickers/master/ggtree/ggtree.png" height="200" align="right" />
... ...
@@ -75,9 +77,16 @@ __G Yu__, DK Smith, H Zhu, Y Guan, TTY Lam^\*^. ggtree: an R package for visuali
75 77
 
76 78
 ```{r echo=F, comment=NA}
77 79
 d <- get_article_cite_history('DO5oG40AAAAJ', 'HtEfBTGE9r8C')
78
-txtplot(d$year, d$cites)
80
+## txtplot(d$year, d$cites)
81
+p <- ggplot(d, aes(year, cites)) + geom_lollipop(point.size=3, point.colour='firebrick') +
82
+    theme_minimal() + xlab(NULL) + ylab(NULL) + labs(title="Citation", caption="data from Google Scholar")
83
+ggsave(p, file="docs/citation.png", width=8, height=4)
79 84
 ```
80 85
 
86
+
87
+<img src="docs/citation.png" width="890"/>
88
+
89
+
81 90
 ### Download stats
82 91
 
83 92
 `r badge_download_bioc("ggtree")`
... ...
@@ -85,13 +94,17 @@ txtplot(d$year, d$cites)
85 94
 `r badge_bioc_download("ggtree", "month", "blue")`
86 95
 
87 96
 
88
-```{r echo=F, comment=NA}
97
+```{r echo=F, message=F, comment=NA}
89 98
 x <- dlstats::bioc_stats("ggtree")
90 99
 x <- x[-nrow(x), ] # last month data is not complete
91
-txtplot(ggtree::Date2decimal(x$end), x$Nb_of_downloads, width=100, height=25)
100
+## txtplot(ggtree::Date2decimal(x$end), x$Nb_of_downloads, width=100, height=25)
101
+p <- ggplot(x, aes(end, Nb_of_distinct_IPs)) + geom_point() + geom_line() +
102
+    theme_minimal() +xlab(NULL) + ylab(NULL) +
103
+    labs(title="ggtree", subtitle="Monthly download stats (distinct IPs)", caption="data from Bioconductor")
104
+ggsave(p, file="docs/dlstats.png", width=8, height=4)
92 105
 ```
93 106
 
94
-
107
+<img src="docs/dlstats.png" width="890"/>
95 108
 
96 109
 ## Contributors
97 110
 
... ...
@@ -35,51 +35,13 @@ Please cite the following article when using `ggtree`:
35 35
 
36 36
 [![citation](https://img.shields.io/badge/cited%20by-25-green.svg?style=flat)](https://scholar.google.com.hk/scholar?oi=bibs&hl=en&cites=7268358477862164627)
37 37
 
38
-    25 +-+---------+---------+---------+---------+---------+---+
39
-       |                                                   *   |
40
-       |                                                       |
41
-    20 +                                                       +
42
-       |                                                       |
43
-    15 +                                                       +
44
-       |                                                       |
45
-       |                                                       |
46
-    10 +                                                       +
47
-       |                                                       |
48
-     5 +                                                       +
49
-       |                                                       |
50
-       | *                                                     |
51
-     0 +-+---------+---------+---------+---------+---------+---+
52
-       2016     2016.2    2016.4    2016.6    2016.8     2017   
38
+<img src="docs/citation.png" width="890"/>
53 39
 
54 40
 ### Download stats
55 41
 
56 42
 [![download](http://www.bioconductor.org/shields/downloads/ggtree.svg)](https://bioconductor.org/packages/stats/bioc/ggtree) [![](https://img.shields.io/badge/download-16964/total-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree) [![](https://img.shields.io/badge/download-885/month-blue.svg?style=flat)](https://bioconductor.org/packages/stats/bioc/ggtree)
57 43
 
58
-         ++-----------------+-----------------+----------------+-----------------+-----------------+---+
59
-    3000 +                                                                                *            +
60
-         |                                                                                             |
61
-         |                                                                                             |
62
-    2500 +                                                                                             +
63
-         |                                                                                             |
64
-         |                                                                                             |
65
-         |                                                                                             |
66
-    2000 +                                                                                   *  *      +
67
-         |                                                                    *     *  *               |
68
-         |                                                              *  *                           |
69
-    1500 +                                                                                             +
70
-         |                                                                                         *   |
71
-         |                                                     *                                       |
72
-         |                                            *           *  *           *                     |
73
-    1000 +                                               *  *                                          +
74
-         |                                 *     *                                                     |
75
-         |                              *     *    *                                                   |
76
-         |                           *                                                                 |
77
-     500 +                  *     *                                                                    +
78
-         |               *     *                                                                       |
79
-         |            *                                                                                |
80
-       0 +   *  *  *                                                                                   +
81
-         ++-----------------+-----------------+----------------+-----------------+-----------------+---+
82
-        2015             2015.5             2016            2016.5             2017             2017.5  
44
+<img src="docs/dlstats.png" width="890"/>
83 45
 
84 46
 Contributors
85 47
 ------------
86 48
new file mode 100644
87 49
Binary files /dev/null and b/docs/citation.png differ
88 50
new file mode 100644
89 51
Binary files /dev/null and b/docs/dlstats.png differ