From 92d913f44f1fc24bdbbf64de89de35031b5dcd54 Mon Sep 17 00:00:00 2001 From: Teun van den Brand <49372158+teunbrand@users.noreply.github.com> Date: Tue, 7 Feb 2023 19:48:31 +0100 Subject: [PATCH] CoordSf takes linewidth instead of size --- NEWS.md | 2 ++ R/coord-sf.R | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index e217b3902a..7018114f31 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,7 @@ # ggplot2 (development version) +* Fixed bug in `coord_sf()` where graticule lines didn't obey + `panel.grid.major`'s linewidth setting (#5179) * `geom_text()` drops observations where `angle = NA` instead of throwing an error (@teunbrand, #2757). * Using two ordered factors as facetting variables in diff --git a/R/coord-sf.R b/R/coord-sf.R index a2c2a49121..986c5bf6b7 100644 --- a/R/coord-sf.R +++ b/R/coord-sf.R @@ -305,7 +305,7 @@ CoordSf <- ggproto("CoordSf", CoordCartesian, } else { line_gp <- gpar( col = el$colour, - lwd = len0_null(el$size*.pt), + lwd = len0_null(el$linewidth * .pt), lty = el$linetype ) grobs <- c(