Skip to content

Commit 8516172

Browse files
committed
update news. closes #2149, #2812
1 parent b4f1652 commit 8516172

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

NEWS.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# ggplot2 3.0.0.9000
22

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

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)