diff --git a/NEWS.md b/NEWS.md index c68d560725..1715a4c82f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,8 @@ * Facet evaluation is better at dealing with inherited errors (@teunbrand, #5670). * Fixed spurious warnings from `sec_axis()` with `breaks = NULL` (#5713). +* Patterns and gradients are now also enabled in `geom_sf()` + (@teunbrand, #5716). # ggplot2 3.5.0 diff --git a/R/geom-sf.R b/R/geom-sf.R index 882da40a64..a4dd6ff344 100644 --- a/R/geom-sf.R +++ b/R/geom-sf.R @@ -202,7 +202,7 @@ sf_grob <- function(x, lineend = "butt", linejoin = "round", linemitre = 10, col <- x$colour %||% defaults$colour[type_ind] col[is_point | is_line] <- alpha(col[is_point | is_line], alpha[is_point | is_line]) fill <- x$fill %||% defaults$fill[type_ind] - fill <- alpha(fill, alpha) + fill <- fill_alpha(fill, alpha) size <- x$size %||% defaults$size[type_ind] linewidth <- x$linewidth %||% defaults$linewidth[type_ind] point_size <- ifelse(