diff --git a/NEWS.md b/NEWS.md index f6e8221ac0..ffdd113269 100644 --- a/NEWS.md +++ b/NEWS.md @@ -156,6 +156,8 @@ is setup once in total instead of once per group (@teunbrand, #5971) * `facet_grid(space = "free")` can now be combined with `coord_fixed()` (@teunbrand, #4584). +* `theme_classic()` now has black ticks and text instead of dark gray. In + addition, `theme_classic()`'s axis line end is `"square"` (@teunbrand, #5978). # ggplot2 3.5.1 diff --git a/R/theme-defaults.R b/R/theme-defaults.R index 9c94e9dce5..522c978c68 100644 --- a/R/theme-defaults.R +++ b/R/theme-defaults.R @@ -460,10 +460,12 @@ theme_classic <- function(base_size = 11, base_family = "", panel.grid.minor = element_blank(), # show axes - axis.line = element_line(colour = "black", linewidth = rel(1)), + axis.text = element_text(size = rel(0.8)), + axis.line = element_line(lineend = "square"), + axis.ticks = element_line(), # simple, black and white strips - strip.background = element_rect(fill = "white", colour = "black", linewidth = rel(2)), + strip.background = element_rect(linewidth = rel(2)), # NB: size is 1 but clipped, it looks like the 0.5 of the axes complete = TRUE diff --git a/tests/testthat/_snaps/theme/theme-classic-large.svg b/tests/testthat/_snaps/theme/theme-classic-large.svg index 96767cc14f..8a4643dba1 100644 --- a/tests/testthat/_snaps/theme/theme-classic-large.svg +++ b/tests/testthat/_snaps/theme/theme-classic-large.svg @@ -43,28 +43,28 @@ 1 - - - - - - -1.0 -1.5 -2.0 -2.5 -3.0 - -1.0 -1.5 -2.0 -2.5 -3.0 - - - - - + + + + + + +1.0 +1.5 +2.0 +2.5 +3.0 + +1.0 +1.5 +2.0 +2.5 +3.0 + + + + + x y diff --git a/tests/testthat/_snaps/theme/theme-classic.svg b/tests/testthat/_snaps/theme/theme-classic.svg index 8588be9819..45ef7ef076 100644 --- a/tests/testthat/_snaps/theme/theme-classic.svg +++ b/tests/testthat/_snaps/theme/theme-classic.svg @@ -43,28 +43,28 @@ 1 - - - - - - -1.0 -1.5 -2.0 -2.5 -3.0 - -1.0 -1.5 -2.0 -2.5 -3.0 - - - - - + + + + + + +1.0 +1.5 +2.0 +2.5 +3.0 + +1.0 +1.5 +2.0 +2.5 +3.0 + + + + + x y