Skip to content

Commit

Permalink
preserve axis text spacing for theme_minimal()
Browse files Browse the repository at this point in the history
  • Loading branch information
teunbrand committed Sep 3, 2024
1 parent d8c96d8 commit 6c136a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/theme-defaults.R
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,11 @@ theme_minimal <- function(base_size = 11, base_family = "",
base_rect_size = base_rect_size
) %+replace%
theme(
axis.ticks = element_blank(),
axis.ticks = element_blank(), # Extra margins due to absence ticks
axis.text.x.bottom = element_text(margin = margin(t = 0.45 * base_size)),
axis.text.x.top = element_text(margin = margin(b = 0.45 * base_size)),
axis.text.y.left = element_text(margin = margin(r = 0.45 * base_size)),
axis.text.y.right = element_text(margin = margin(l = 0.45 * base_size)),
legend.background = element_blank(),
legend.key = element_blank(),
panel.background = element_blank(),
Expand Down

0 comments on commit 6c136a1

Please sign in to comment.