Skip to content

Commit b6c0cbc

Browse files
committed
update news. closes tidyverse#2149, tidyverse#2812
1 parent 9917306 commit b6c0cbc

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
@@ -1,7 +1,15 @@
11
# ggplot2 3.0.0.9000
22

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

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)