Skip to content

Commit d6a5066

Browse files
committed
Add missing parent elements to theme_void
1 parent fc2dc4d commit d6a5066

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

R/theme-defaults.r

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ theme_classic <- function(base_size = 11, base_family = "",
375375
theme_void <- function(base_size = 11, base_family = "",
376376
base_line_size = base_size / 22,
377377
base_rect_size = base_size / 22) {
378+
half_line <- base_size / 2
378379
theme(
379380
# Use only inherited elements and make almost everything blank
380381
# Only keep indispensable text
@@ -389,11 +390,15 @@ theme_void <- function(base_size = 11, base_family = "",
389390
axis.text = element_blank(),
390391
axis.title = element_blank(),
391392
axis.ticks.length = unit(0, "pt"),
393+
legend.key.size = unit(1.2, "lines"),
392394
legend.position = "right",
393395
legend.text = element_text(size = rel(0.8)),
394396
legend.title = element_text(hjust = 0),
395397
strip.text = element_text(size = rel(0.8)),
398+
strip.switch.pad.grid = unit(0.1, "cm"),
399+
strip.switch.pad.wrap = unit(0.1, "cm"),
396400
panel.ontop = FALSE,
401+
panel.spacing = unit(half_line, "pt"),
397402
plot.margin = unit(c(0, 0, 0, 0), "lines"),
398403

399404
complete = TRUE

0 commit comments

Comments
 (0)