Browse code

import theme_transparent from ggfun

Bjørn Tore Kopperud authored on 28/01/2022 11:02:50 • GitHub committed on 28/01/2022 11:02:50
Showing1 changed files

... ...
@@ -119,12 +119,7 @@ theme_tree2_internal <- function(bgcolor="white", fgcolor="black",
119 119
 theme_inset <- function(legend.position =  "none", ...) {
120 120
     list(xlab(NULL),
121 121
          ylab(NULL),
122
-         theme_tree(legend.position = legend.position,
123
-                    function() theme(panel.background = element_rect(fill = "transparent", colour = NA),
124
-                                     plot.background = element_rect(fill = "transparent", colour = NA), 
125
-                                     legend.key = element_rect(fill = "transparent", colour = NA),
126
-                                     legend.background = element_rect(fill = "transparent",colour = NA),
127
-                                     ...)
128
-                    )
122
+         theme_tree(legend.position = legend.position, ...),
123
+         ggfun::theme_transparent()
129 124
          )
130 125
 }