Browse code

remove theme_transparent

guangchuang yu authored on 04/12/2017 12:41:52
Showing5 changed files

... ...
@@ -94,7 +94,6 @@ export(stat_balance)
94 94
 export(stat_hilight)
95 95
 export(subview)
96 96
 export(theme_inset)
97
-export(theme_transparent)
98 97
 export(theme_tree)
99 98
 export(theme_tree2)
100 99
 export(viewClade)
... ...
@@ -1,6 +1,6 @@
1 1
 CHANGES IN VERSION 1.11.2
2 2
 ------------------------
3
- o deprecate subview, annotation_image and phylopic <2017-12-04, Mon>
3
+ o deprecate subview, annotation_image and phylopic; remove theme_transparent <2017-12-04, Mon>
4 4
  o geom_tiplab now supports geom = "image" or geom = "phylopic" <2017-12-04, Mon>
5 5
  o A new layer geom_nodelab that equivalent to geom_tiplab but works for internal node <2017-12-04, Mon>
6 6
 
... ...
@@ -47,16 +47,12 @@ plot_fantree <- function(fantree, upper=TRUE) {
47 47
         annotation_custom(ggplotGrob(fantree),
48 48
                           xmin=-.15, xmax=1.15,
49 49
                           ymin=ymin, ymax=ymax)
50
-    ## d <- data.frame(x=c(0,1), y=c(0.5, 1))
51
-    ## ggplot(d, aes_(x=~x, y=~y)) %>%
52
-    ##     subview(fantree, 0.5, y, width=2, height=2.2) ##  %>%
53
-    ## subview(p2+theme_transparent(), 0.5, 0.45, width=2, height=2.2) + theme_tree()
54 50
 }
55 51
 
56 52
 plot_fantrees <- function(uppertree, lowertree) {
57 53
     ggplot() + xlim(0,1) + ylim(0.5, 1) + theme_tree() +
58 54
         annotation_custom(ggplotGrob(uppertree), xmin=-.15, xmax=1.15, ymin=0.52, ymax=1.02) +
59
-        annotation_custom(ggplotGrob(lowertree + theme_transparent()), xmin=-.15, xmax=1.15, ymin=0.48, ymax=0.98)
55
+        annotation_custom(ggplotGrob(lowertree + ggimage::theme_transparent()), xmin=-.15, xmax=1.15, ymin=0.48, ymax=0.98)
60 56
 }
61 57
 
62 58
 
... ...
@@ -77,32 +77,6 @@ theme_tree2_internal <- function(bgcolor="white", fgcolor="black",
77 77
               ...)
78 78
 }
79 79
 
80
-##' transparent background theme
81
-##'
82
-##'
83
-##' @title theme_transparent
84
-##' @param ... additional parameter to tweak the theme
85
-##' @return ggplot object
86
-##' @importFrom ggplot2 theme
87
-##' @importFrom ggplot2 element_rect
88
-##' @export
89
-##' @author Guangchuang Yu
90
-theme_transparent <- function(...) {
91
-    message("this theme was moved to ggimage::theme_transparent and will be removed in next release")
92
-
93
-    theme(panel.background = element_rect(
94
-              fill = "transparent",
95
-              colour = NA),
96
-          plot.background = element_rect(
97
-              fill = "transparent",
98
-              colour = NA),
99
-          legend.key = element_rect(
100
-              fill = "transparent",
101
-              colour = NA),
102
-          legend.background = element_rect(
103
-              fill = "transparent",
104
-              colour = NA), ...)
105
-}
106 80
 
107 81
 ##' inset theme
108 82
 ##'
... ...
@@ -113,10 +87,9 @@ theme_transparent <- function(...) {
113 87
 ##' @export
114 88
 ##' @author Guangchuang Yu
115 89
 theme_inset <- function(...) {
116
-    message("this theme will be removed in next release")
117 90
     list(xlab(NULL),
118 91
          ylab(NULL),
119 92
          theme_tree(...),
120
-         theme_transparent()
93
+         ggimage::theme_transparent()
121 94
          )
122 95
 }
123 96
deleted file mode 100644
... ...
@@ -1,20 +0,0 @@
1
-% Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/theme.R
3
-\name{theme_transparent}
4
-\alias{theme_transparent}
5
-\title{theme_transparent}
6
-\usage{
7
-theme_transparent(...)
8
-}
9
-\arguments{
10
-\item{...}{additional parameter to tweak the theme}
11
-}
12
-\value{
13
-ggplot object
14
-}
15
-\description{
16
-transparent background theme
17
-}
18
-\author{
19
-Guangchuang Yu
20
-}