Browse code

bug fixed of theme_tree2(), see also #218

Guangchuang Yu authored on 14/01/2019 02:40:45
Showing 2 changed files

  • NEWS.md index 88c19643..874d3d33 100644
  • R/theme.R index 00c5fe65..9a830bd9 100644
... ...
@@ -1,5 +1,7 @@
1 1
 # ggtree 1.15.5
2 2
 
3
++ bug fixed of `theme_tree2` (2019-01-14, Mon)
4
+  - <https://github.com/GuangchuangYu/ggtree/issues/218>  
3 5
 + mv `rescale_tree` to `treeio` (2019-01-11, Fri)
4 6
 
5 7
 # ggtree 1.15.4
... ...
@@ -63,14 +63,16 @@ theme_tree2_internal <- function(bgcolor="white", fgcolor="black",
63 63
                                  axis.line.y=element_blank(),
64 64
                                  axis.ticks.y=element_blank(),
65 65
                                  axis.text.y=element_blank(),...) {
66
+    ## need to set axis.line otherwise the the settng cannot be inherited.
67
+    ## https://github.com/GuangchuangYu/ggtree/issues/218
66 68
     theme_bw() +
67 69
         theme(legend.position=legend.position,
68 70
               panel.grid.minor=panel.grid.minor,
69 71
               panel.grid.major=panel.grid.major,
70 72
               panel.background=element_rect(fill=bgcolor, colour=bgcolor),
71 73
               panel.border=panel.border,
72
-              ## axis.line=element_line(color=fgcolor),
73
-              axis.line.x=element_line(color=fgcolor),
74
+              axis.line=element_line(color=fgcolor),
75
+              ##axis.line.x=element_line(color=fgcolor),
74 76
               axis.line.y=axis.line.y,
75 77
               axis.ticks.y=axis.ticks.y,
76 78
               axis.text.y=axis.text.y,