From d718aec6253ef4ee10e114c529ce5a629b5afcdb Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Mon, 8 Jul 2024 14:23:24 +0200 Subject: [PATCH 1/3] update `theme_classic()` --- R/theme-defaults.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/R/theme-defaults.R b/R/theme-defaults.R index 6ecd6d68c0..5c1f5c7c00 100644 --- a/R/theme-defaults.R +++ b/R/theme-defaults.R @@ -441,10 +441,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 From d6d20a4413d01ba1745b2ae17a5c5c47e30af461 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Mon, 8 Jul 2024 14:24:08 +0200 Subject: [PATCH 2/3] accept snapshots --- .../_snaps/theme/theme-classic-large.svg | 44 +++++++++---------- tests/testthat/_snaps/theme/theme-classic.svg | 44 +++++++++---------- 2 files changed, 44 insertions(+), 44 deletions(-) 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 From cd93462dc3a31bbdf402b5531db3b16c8de37ef0 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Mon, 8 Jul 2024 14:26:11 +0200 Subject: [PATCH 3/3] add news bullet --- NEWS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS.md b/NEWS.md index 7e8594b4da..ce8f68fcad 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # ggplot2 (development version) +* `theme_classic()` now has black ticks and text instead of dark gray. In + addition, `theme_classic()`'s axis line end is `"square"` (@teunbrand, #5978). * All position scales now use the same definition of `x` and `y` aesthetics. This lets uncommon aesthetics like `xintercept` expand scales as usual. (#3342, #4966, @teunbrand)