Skip to content

Commit 8ca3bbc

Browse files
authored
Update theme_classic() (#5981)
* update `theme_classic()` * accept snapshots * add news bullet
1 parent 3a7ae74 commit 8ca3bbc

File tree

4 files changed

+50
-46
lines changed

4 files changed

+50
-46
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@
156156
is setup once in total instead of once per group (@teunbrand, #5971)
157157
* `facet_grid(space = "free")` can now be combined with `coord_fixed()`
158158
(@teunbrand, #4584).
159+
* `theme_classic()` now has black ticks and text instead of dark gray. In
160+
addition, `theme_classic()`'s axis line end is `"square"` (@teunbrand, #5978).
159161

160162
# ggplot2 3.5.1
161163

R/theme-defaults.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,10 +460,12 @@ theme_classic <- function(base_size = 11, base_family = "",
460460
panel.grid.minor = element_blank(),
461461

462462
# show axes
463-
axis.line = element_line(colour = "black", linewidth = rel(1)),
463+
axis.text = element_text(size = rel(0.8)),
464+
axis.line = element_line(lineend = "square"),
465+
axis.ticks = element_line(),
464466

465467
# simple, black and white strips
466-
strip.background = element_rect(fill = "white", colour = "black", linewidth = rel(2)),
468+
strip.background = element_rect(linewidth = rel(2)),
467469
# NB: size is 1 but clipped, it looks like the 0.5 of the axes
468470

469471
complete = TRUE

tests/testthat/_snaps/theme/theme-classic-large.svg

Lines changed: 22 additions & 22 deletions
Loading

tests/testthat/_snaps/theme/theme-classic.svg

Lines changed: 22 additions & 22 deletions
Loading

0 commit comments

Comments
 (0)