Skip to content

Commit 26cf887

Browse files
committed
update news. closes tidyverse#2149, tidyverse#2812
1 parent d54a403 commit 26cf887

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

NEWS.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,16 @@
33
* `geom_sf()` now respects `lineend`, `linejoin`, and `linemitre` parameters
44
for lines and polygons (@alistaire47, #2826)
55

6+
* The function `range()` in `Coord` has been renamed to `backtransform_range()`
7+
to clarify its intended meaning. This affects developers of custom coords. It
8+
may also affect developers of custom geoms that use the `range()` function. That
9+
code should be migrated to use `backtransform_range()` (@clauswilke, breaking change).
10+
11+
* `geom_hline()`, `geom_vline()`, and `geom_abline()` now work properly
12+
with `coord_trans()` (@clauswilke, #2149, #2812).
13+
614
* `benchplot()` now uses tidy evaluation (@dpseidel, #2699).
7-
15+
816
* `fortify()` now displays a more informative error message for
917
`grouped_df()` objects when dplyr is not installed (@jimhester, #2822).
1018

R/coord-.r

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,23 @@ Coord <- ggproto("Coord",
7777
# back into range in given in (possibly scale-transformed)
7878
# data coordinates
7979
backtransform_range = function(panel_params) {
80-
warning("range backtransformation not implemented in this coord; plot may be wrong.")
80+
warning(
81+
"range backtransformation not implemented in this coord; plot may be wrong.",
82+
call. = FALSE
83+
)
8184
list(x = panel_params$x.range, y = panel_params$y.range)
8285
},
8386

87+
# deprecated, do not use or reimplement
88+
# kept only for backwards compatibility
89+
range = function(self, panel_params) {
90+
warning(
91+
"function `Coord$range()` is deprecated; use `Coord$backtransform_range()`.",
92+
call. = FALSE
93+
)
94+
self$backtransform_range(panel_params)
95+
}
96+
8497
setup_panel_params = function(scale_x, scale_y, params = list()) {
8598
list()
8699
},

0 commit comments

Comments
 (0)