@@ -497,6 +497,35 @@ theme_classic <- function(base_size = 11, base_family = "",
497
497
)
498
498
}
499
499
500
+ # ' @export
501
+ # ' @rdname ggtheme
502
+ theme_transparent <- function (base_size = 11 , base_family = " " ,
503
+ base_line_size = base_size / 22 ,
504
+ base_rect_size = base_size / 22 ) {
505
+ # Based on theme_bw
506
+ theme_grey(
507
+ base_size = base_size ,
508
+ base_family = base_family ,
509
+ base_line_size = base_line_size ,
510
+ base_rect_size = base_rect_size
511
+ ) %+ replace %
512
+ theme(
513
+ panel.background = element_blank(),
514
+ plot.background = element_blank(),
515
+ legend.background = element_blank(),
516
+ legend.key = element_blank(),
517
+ # theme_bw specifications
518
+ panel.border = element_rect(fill = NA , colour = " grey20" ),
519
+ # make gridlines dark, same contrast with white as in theme_grey
520
+ panel.grid = element_line(colour = " grey92" ),
521
+ panel.grid.minor = element_line(linewidth = rel(0.5 )),
522
+ # contour strips to match panel contour
523
+ strip.background = element_rect(fill = " grey85" , colour = " grey20" ),
524
+
525
+ complete = TRUE
526
+ )
527
+ }
528
+
500
529
# ' @export
501
530
# ' @rdname ggtheme
502
531
theme_void <- function (base_size = 11 , base_family = " " ,
@@ -744,34 +773,3 @@ theme_all_null <- function() {
744
773
args <- c(elements , list (complete = TRUE ))
745
774
inject(theme(!!! args ))
746
775
}
747
-
748
- # ' @export
749
- # ' @rdname ggtheme
750
- theme_transparent <- function (base_size = 11 , base_family = " " ,
751
- base_line_size = base_size / 22 ,
752
- base_rect_size = base_size / 22 ) {
753
- # Based on theme_bw
754
- theme_grey(
755
- base_size = base_size ,
756
- base_family = base_family ,
757
- base_line_size = base_line_size ,
758
- base_rect_size = base_rect_size
759
- ) %+ replace %
760
- theme(
761
- panel.background = element_blank(),
762
- plot.background = element_blank(),
763
- legend.background = element_blank(),
764
- legend.key = element_blank(),
765
- # theme_bw specifications
766
- panel.border = element_rect(fill = NA , colour = " grey20" ),
767
- # make gridlines dark, same contrast with white as in theme_grey
768
- panel.grid = element_line(colour = " grey92" ),
769
- panel.grid.minor = element_line(linewidth = rel(0.5 )),
770
- # contour strips to match panel contour
771
- strip.background = element_rect(fill = " grey85" , colour = " grey20" ),
772
-
773
- complete = TRUE
774
- )
775
- }
776
-
777
-
0 commit comments