Skip to content

Commit

Permalink
Patterns in geom_sf() (#5717)
Browse files Browse the repository at this point in the history
* Use `fill_alpha()` instead of `alpha()`

* add news bullet
  • Loading branch information
teunbrand committed Feb 27, 2024
1 parent 6e972c1 commit 9b4d4fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion R/geom-sf.R
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 9b4d4fe

Please sign in to comment.