Browse code

update docs

guangchuang yu authored on 28/12/2017 08:25:57
Showing1 changed files

... ...
@@ -27,6 +27,7 @@ knitr::opts_chunk$set(tidy = FALSE,
27 27
 
28 28
 ```{r echo=FALSE, results="hide", message=FALSE}
29 29
 library("ape")
30
+library("grid")
30 31
 library("ggplot2")
31 32
 library("cowplot")
32 33
 library("treeio")
... ...
@@ -160,7 +161,7 @@ ggtree(tr) + scale_x_reverse(limits=c(10, 0)) + coord_polar(theta='y')
160 161
 ```
161 162
 
162 163
 ```{r fig.keep='none', echo=FALSE, warning=FALSE}
163
-sv <- grid::grid.grabExpr(print(ggtree(tr), newpage=TRUE, vp = grid::viewport(angle=-30, width=.9, height=.9)))
164
+tree_angle <- grid::grid.grabExpr(print(ggtree(tr), newpage=TRUE, vp = grid::viewport(angle=-30, width=.9, height=.9)))
164 165
 ```
165 166
 
166 167
 ```{r fig.width=8, fig.height = 8, echo=FALSE, warning=FALSE}
... ...
@@ -168,7 +169,7 @@ plot_grid(
168 169
     ggtree(tr) + scale_x_reverse(),
169 170
     ggtree(tr) + coord_flip(),
170 171
     ggtree(tr) + scale_x_reverse() + coord_flip(),
171
-    sv,
172
+    tree_angle,
172 173
     ggtree(tr, layout='slanted') + coord_flip(),
173 174
     ggtree(tr, layout='slanted', branch.length='none') + coord_flip() + scale_y_reverse() +scale_x_reverse(),
174 175
     ggtree(tr, layout='circular') + xlim(-10, NA),