Skip to content

Commit 11b6c39

Browse files
authored
Compute stat_sf() by panel instead of group (#5170)
* StatSf is computed per panel * Add NEWS bullet * Fix typo/reword
1 parent 5074f11 commit 11b6c39

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# ggplot2 (development version)
22

3+
* To prevent changing the plotting order, `stat_sf()` is now computed per panel
4+
instead of per group (@teunbrand, #4340).
35
* ggplot2 now uses `scales::DiscreteRange` and `scales::ContinuousRange`, which
46
are available to write scale extensions from scratch (@teunbrand, #2710).
57
* For the purposes of checking required or non-missing aesthetics, character

R/stat-sf.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ StatSf <- ggproto("StatSf", Stat,
99
ggproto_parent(Stat, self)$compute_layer(data, params, layout)
1010
},
1111

12-
compute_group = function(data, scales, coord) {
12+
compute_panel = function(data, scales, coord) {
1313
geometry_data <- data[[ geom_column(data) ]]
1414
geometry_crs <- sf::st_crs(geometry_data)
1515

0 commit comments

Comments
 (0)