@@ -500,28 +500,34 @@ theme_classic <- function(base_size = 11, base_family = "",
500
500
# ' @export
501
501
# ' @rdname ggtheme
502
502
theme_transparent <- function (base_size = 11 , base_family = " " ,
503
+ header_family = NULL ,
503
504
base_line_size = base_size / 22 ,
504
- base_rect_size = base_size / 22 ) {
505
+ base_rect_size = base_size / 22 ,
506
+ ink = " black" , paper = alpha(ink , 0 )) {
507
+ force(ink )
505
508
# Based on theme_bw
506
509
theme_grey(
507
510
base_size = base_size ,
508
511
base_family = base_family ,
512
+ header_family = header_family ,
509
513
base_line_size = base_line_size ,
510
- base_rect_size = base_rect_size
514
+ base_rect_size = base_rect_size ,
515
+ ink = ink , paper = paper
511
516
) %+ replace %
512
517
theme(
513
518
panel.background = element_blank(),
514
519
plot.background = element_blank(),
515
520
legend.background = element_blank(),
516
521
legend.key = element_blank(),
517
522
# theme_bw specifications
518
- panel.border = element_rect(fill = NA , colour = " grey20 " ),
523
+ panel.border = element_rect(fill = NA , colour = col_mix( ink , paper , 0.20 ) ),
519
524
# 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 )),
525
+ panel.grid = element_line(colour = col_mix(ink , paper , 0.92 )),
522
526
# contour strips to match panel contour
523
- strip.background = element_rect(fill = " grey85" , colour = " grey20" ),
524
-
527
+ strip.background = element_rect(
528
+ fill = col_mix(ink , paper , 0.85 ),
529
+ colour = col_mix(ink , paper , 0.20 ),
530
+ ),
525
531
complete = TRUE
526
532
)
527
533
}
0 commit comments