diff --git a/R/theme-defaults.R b/R/theme-defaults.R
index 6ecd6d68c0..d94a8bcc81 100644
--- a/R/theme-defaults.R
+++ b/R/theme-defaults.R
@@ -137,8 +137,8 @@ theme_grey <- function(base_size = 11, base_family = "",
margins = margin(half_line, half_line, half_line, half_line),
axis.line = element_blank(),
- axis.line.x = NULL,
- axis.line.y = NULL,
+ axis.line.x = element_line(lineend = "square", inherit.blank = TRUE),
+ axis.line.y = element_line(lineend = "square", inherit.blank = TRUE),
axis.text = element_text(size = rel(0.8), colour = "grey30"),
axis.text.x = element_text(margin = margin(t = 0.8 * half_line / 2), vjust = 1),
axis.text.x.top = element_text(margin = margin(b = 0.8 * half_line / 2), vjust = 0),
diff --git a/tests/testthat/_snaps/coord-polar/bottom-half-circle-with-rotated-text.svg b/tests/testthat/_snaps/coord-polar/bottom-half-circle-with-rotated-text.svg
index 30c4b0fc24..d6eb14756b 100644
--- a/tests/testthat/_snaps/coord-polar/bottom-half-circle-with-rotated-text.svg
+++ b/tests/testthat/_snaps/coord-polar/bottom-half-circle-with-rotated-text.svg
@@ -62,8 +62,8 @@
-
-
+
+
0 degrees
90 degrees
diff --git a/tests/testthat/_snaps/coord-polar/inner-radius-with-all-axes.svg b/tests/testthat/_snaps/coord-polar/inner-radius-with-all-axes.svg
index 212100c87c..fc0a945481 100644
--- a/tests/testthat/_snaps/coord-polar/inner-radius-with-all-axes.svg
+++ b/tests/testthat/_snaps/coord-polar/inner-radius-with-all-axes.svg
@@ -83,7 +83,7 @@
-
+
100
200
300
@@ -92,8 +92,8 @@
-
-
+
+
10
15
20
@@ -106,7 +106,7 @@
-
+
diff --git a/tests/testthat/_snaps/coord-polar/partial-with-all-axes.svg b/tests/testthat/_snaps/coord-polar/partial-with-all-axes.svg
index bc58f6429b..2cf7eac930 100644
--- a/tests/testthat/_snaps/coord-polar/partial-with-all-axes.svg
+++ b/tests/testthat/_snaps/coord-polar/partial-with-all-axes.svg
@@ -88,7 +88,7 @@
-
+
10
15
20
@@ -101,8 +101,8 @@
-
-
+
+
100
200
300
@@ -111,7 +111,7 @@
-
+
diff --git a/tests/testthat/_snaps/guides/axis-guides-with-capped-ends.svg b/tests/testthat/_snaps/guides/axis-guides-with-capped-ends.svg
index 393ffb017b..f50e7c4888 100644
--- a/tests/testthat/_snaps/guides/axis-guides-with-capped-ends.svg
+++ b/tests/testthat/_snaps/guides/axis-guides-with-capped-ends.svg
@@ -75,14 +75,14 @@
-
+
100
200
300
-
+
100
200
300
@@ -91,7 +91,7 @@
-
+
@@ -100,7 +100,7 @@
200
300
400
-
+
diff --git a/tests/testthat/_snaps/guides/guide-axis-theta-in-cartesian-coordinates.svg b/tests/testthat/_snaps/guides/guide-axis-theta-in-cartesian-coordinates.svg
index f9c50c7388..65c9060d2d 100644
--- a/tests/testthat/_snaps/guides/guide-axis-theta-in-cartesian-coordinates.svg
+++ b/tests/testthat/_snaps/guides/guide-axis-theta-in-cartesian-coordinates.svg
@@ -88,7 +88,7 @@
-
+
10
15
20
@@ -101,7 +101,7 @@
-
+
10
15
20
@@ -114,7 +114,7 @@
-
+
100
200
300
@@ -123,7 +123,7 @@
-
+
disp
mpg
guide_axis_theta in cartesian coordinates
diff --git a/tests/testthat/_snaps/guides/guide-axis-theta-with-angle-adapting-to-theta.svg b/tests/testthat/_snaps/guides/guide-axis-theta-with-angle-adapting-to-theta.svg
index b6cfa798fc..5d9f41ac4e 100644
--- a/tests/testthat/_snaps/guides/guide-axis-theta-with-angle-adapting-to-theta.svg
+++ b/tests/testthat/_snaps/guides/guide-axis-theta-with-angle-adapting-to-theta.svg
@@ -136,7 +136,7 @@
-
+
75
100
125
@@ -171,8 +171,8 @@
-
-
+
+
10
15
20
diff --git a/tests/testthat/_snaps/guides/left-aligned-legend-key.svg b/tests/testthat/_snaps/guides/left-aligned-legend-key.svg
index fc84b274ea..f591bfa25f 100644
--- a/tests/testthat/_snaps/guides/left-aligned-legend-key.svg
+++ b/tests/testthat/_snaps/guides/left-aligned-legend-key.svg
@@ -80,7 +80,7 @@
-
+
10
15
20
@@ -93,7 +93,7 @@
-
+
diff --git a/tests/testthat/_snaps/guides/stacked-axes.svg b/tests/testthat/_snaps/guides/stacked-axes.svg
index 9ed86845f6..cc3bf12f57 100644
--- a/tests/testthat/_snaps/guides/stacked-axes.svg
+++ b/tests/testthat/_snaps/guides/stacked-axes.svg
@@ -75,21 +75,21 @@
-
+
100
200
300
-
+
100
200
300
-
+
100
200
300
@@ -98,7 +98,7 @@
-
+
100
200
300
@@ -107,7 +107,7 @@
-
+
@@ -116,7 +116,7 @@
200
300
400
-
+
@@ -125,14 +125,14 @@
200
300
400
-
+
100
200
300
-
+
diff --git a/tests/testthat/_snaps/guides/stacked-radial-axes.svg b/tests/testthat/_snaps/guides/stacked-radial-axes.svg
index 18609a9a74..82f510e939 100644
--- a/tests/testthat/_snaps/guides/stacked-radial-axes.svg
+++ b/tests/testthat/_snaps/guides/stacked-radial-axes.svg
@@ -77,29 +77,29 @@
-
+
100
200
300
-
+
100
200
300
-
+
100
200
300
-
-
+
+
100
200
300
@@ -108,7 +108,7 @@
-
+
100
200
300
@@ -117,7 +117,7 @@
-
+
@@ -126,7 +126,7 @@
200
300
400
-
+
diff --git a/tests/testthat/_snaps/theme/axes-styling.svg b/tests/testthat/_snaps/theme/axes-styling.svg
index 345db8bb68..632b6753d3 100644
--- a/tests/testthat/_snaps/theme/axes-styling.svg
+++ b/tests/testthat/_snaps/theme/axes-styling.svg
@@ -55,7 +55,7 @@
-
+
@@ -64,7 +64,7 @@
5.0
7.5
10.0
-
+
2.5
5.0
7.5
@@ -73,7 +73,7 @@
-
+
@@ -82,7 +82,7 @@
5.0
7.5
10.0
-
+
diff --git a/tests/testthat/_snaps/theme/theme-classic-large.svg b/tests/testthat/_snaps/theme/theme-classic-large.svg
index 96767cc14f..e1f3f7c793 100644
--- a/tests/testthat/_snaps/theme/theme-classic-large.svg
+++ b/tests/testthat/_snaps/theme/theme-classic-large.svg
@@ -43,7 +43,7 @@
1
-
+
@@ -54,7 +54,7 @@
2.0
2.5
3.0
-
+
1.0
1.5
2.0
diff --git a/tests/testthat/_snaps/theme/theme-classic.svg b/tests/testthat/_snaps/theme/theme-classic.svg
index 8588be9819..d1a77a131e 100644
--- a/tests/testthat/_snaps/theme/theme-classic.svg
+++ b/tests/testthat/_snaps/theme/theme-classic.svg
@@ -43,7 +43,7 @@
1
-
+
@@ -54,7 +54,7 @@
2.0
2.5
3.0
-
+
1.0
1.5
2.0