@@ -172,7 +172,7 @@ theme_grey <- function(base_size = 11, base_family = "",
172
172
legend.spacing.x = NULL ,
173
173
legend.spacing.y = NULL ,
174
174
legend.margin = margin(half_line , half_line , half_line , half_line ),
175
- legend.key = element_rect( fill = " grey95 " , colour = NA ) ,
175
+ legend.key = NULL ,
176
176
legend.key.size = unit(1.2 , " lines" ),
177
177
legend.key.height = NULL ,
178
178
legend.key.width = NULL ,
@@ -266,8 +266,6 @@ theme_bw <- function(base_size = 11, base_family = "",
266
266
panel.grid.minor = element_line(linewidth = rel(0.5 )),
267
267
# contour strips to match panel contour
268
268
strip.background = element_rect(fill = " grey85" , colour = " grey20" ),
269
- # match legend key to background
270
- legend.key = element_rect(fill = " white" , colour = NA ),
271
269
272
270
complete = TRUE
273
271
)
@@ -340,9 +338,6 @@ theme_light <- function(base_size = 11, base_family = "",
340
338
# match axes ticks thickness to gridlines and colour to panel border
341
339
axis.ticks = element_line(colour = " grey70" , linewidth = rel(0.5 )),
342
340
343
- # match legend key to panel.background
344
- legend.key = element_rect(fill = " white" , colour = NA ),
345
-
346
341
# dark strips with light text (inverse contrast compared to theme_grey)
347
342
strip.background = element_rect(fill = " grey70" , colour = NA ),
348
343
strip.text = element_text(
@@ -382,9 +377,6 @@ theme_dark <- function(base_size = 11, base_family = "",
382
377
# match axes ticks thickness to gridlines
383
378
axis.ticks = element_line(colour = " grey20" , linewidth = rel(0.5 )),
384
379
385
- # match legend key to panel.background
386
- legend.key = element_rect(fill = " grey50" , colour = NA ),
387
-
388
380
# dark strips with light text (inverse contrast compared to theme_grey)
389
381
strip.background = element_rect(fill = " grey15" , colour = NA ),
390
382
strip.text = element_text(
@@ -442,9 +434,6 @@ theme_classic <- function(base_size = 11, base_family = "",
442
434
# show axes
443
435
axis.line = element_line(colour = " black" , linewidth = rel(1 )),
444
436
445
- # match legend key to panel.background
446
- legend.key = element_blank(),
447
-
448
437
# simple, black and white strips
449
438
strip.background = element_rect(fill = " white" , colour = " black" , linewidth = rel(2 )),
450
439
# NB: size is 1 but clipped, it looks like the 0.5 of the axes
@@ -586,7 +575,7 @@ theme_test <- function(base_size = 11, base_family = "",
586
575
legend.spacing.x = NULL ,
587
576
legend.spacing.y = NULL ,
588
577
legend.margin = margin(0 , 0 , 0 , 0 , " cm" ),
589
- legend.key = element_rect( fill = " white " , colour = NA ) ,
578
+ legend.key = NULL ,
590
579
legend.key.size = unit(1.2 , " lines" ),
591
580
legend.key.height = NULL ,
592
581
legend.key.width = NULL ,
0 commit comments