Skip to content

Commit 5719f08

Browse files
committed
rename coord_trans to coord_transform, issue #5825
1 parent 19d4550 commit 5719f08

31 files changed

+968
-147
lines changed

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ export(coord_quickmap)
318318
export(coord_radial)
319319
export(coord_sf)
320320
export(coord_trans)
321+
export(coord_transform)
321322
export(cut_interval)
322323
export(cut_number)
323324
export(cut_width)

NEWS.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@
133133
(@teunbrand, #5938, #4327).
134134
* Fixed bug where empty discrete scales weren't recognised as such
135135
(@teunbrand, #5945).
136+
* `coord_trans()` renamed to `coord_transform()` (@nmercadeb, #5825).
136137

137138
# ggplot2 3.5.1
138139

@@ -750,7 +751,7 @@ gains in rendering speed.
750751

751752
* `geom_linerange()` now respects the `na.rm` argument (#4927, @thomasp85)
752753

753-
* Improve the support for `guide_axis()` on `coord_trans()`
754+
* Improve the support for `guide_axis()` on `coord_transform()`
754755
(@yutannihilation, #3959)
755756

756757
* Added `stat_align()` to align data without common x-coordinates prior to
@@ -1194,17 +1195,17 @@ fail.
11941195

11951196
## Minor improvements and bug fixes
11961197

1197-
* `coord_trans()` now draws second axes and accepts `xlim`, `ylim`,
1198+
* `coord_transform()` now draws second axes and accepts `xlim`, `ylim`,
11981199
and `expand` arguments to bring it up to feature parity with
11991200
`coord_cartesian()`. The `xtrans` and `ytrans` arguments that were
12001201
deprecated in version 1.0.1 in favour of `x` and `y`
12011202
were removed (@paleolimbot, #2990).
12021203

1203-
* `coord_trans()` now calculates breaks using the expanded range
1204+
* `coord_transform()` now calculates breaks using the expanded range
12041205
(previously these were calculated using the unexpanded range,
1205-
which resulted in differences between plots made with `coord_trans()`
1206+
which resulted in differences between plots made with `coord_transform()`
12061207
and those made with `coord_cartesian()`). The expansion for discrete axes
1207-
in `coord_trans()` was also updated such that it behaves identically
1208+
in `coord_transform()` was also updated such that it behaves identically
12081209
to that in `coord_cartesian()` (@paleolimbot, #3338).
12091210

12101211
* `expand_scale()` was deprecated in favour of `expansion()` for setting
@@ -1544,7 +1545,7 @@ accompanying issue #2890.
15441545
(@mikmart, #2488).
15451546

15461547
* `geom_hline()`, `geom_vline()`, and `geom_abline()` now work properly
1547-
with `coord_trans()` (@clauswilke, #2149, #2812).
1548+
with `coord_transform()` (@clauswilke, #2149, #2812).
15481549

15491550
* `geom_text(..., parse = TRUE)` now correctly renders the expected number of
15501551
items instead of silently dropping items that are empty expressions, e.g.
@@ -1987,7 +1988,7 @@ accompanying issue #2890.
19871988
(@dylan-stark, #2072), and can draw the radius axis on the right
19881989
(@thomasp85, #2005).
19891990
1990-
* `coord_trans()` now generates a warning when a transformation generates
1991+
* `coord_transform()` now generates a warning when a transformation generates
19911992
non-finite values (@foo-bar-baz-qux, #2147).
19921993
19931994
### Themes
@@ -2816,7 +2817,7 @@ version of ggplot.
28162817
* `coord_cartesian()` applies the same expansion factor to limits as for scales.
28172818
You can suppress with `expand = FALSE` (#1207).
28182819

2819-
* `coord_trans()` now works when breaks are suppressed (#1422).
2820+
* `coord_transform()` now works when breaks are suppressed (#1422).
28202821

28212822
* `cut_number()` gives error message if the number of requested bins can
28222823
be created because there are two few unique values (#1046).

R/annotation-logticks.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#' @param scaled is the data already log-scaled? This should be `TRUE`
2525
#' (default) when the data is already transformed with `log10()` or when
2626
#' using `scale_y_log10()`. It should be `FALSE` when using
27-
#' `coord_trans(y = "log10")`.
27+
#' `coord_transform(y = "log10")`.
2828
#' @param colour Colour of the tick marks.
2929
#' @param linewidth Thickness of tick marks, in mm.
3030
#' @param linetype Linetype of tick marks (`solid`, `dashed`, etc.)
@@ -36,7 +36,7 @@
3636
#' @export
3737
#' @seealso [scale_y_continuous()], [scale_y_log10()] for log scale
3838
#' transformations.
39-
#' @seealso [coord_trans()] for log coordinate transformations.
39+
#' @seealso [coord_transform()] for log coordinate transformations.
4040
#'
4141
#' @examples
4242
#' # Make a log-log plot (without log ticks)
@@ -75,7 +75,7 @@
7575
#' # Using a coordinate transform requires scaled = FALSE
7676
#' t <- ggplot(msleep, aes(bodywt, brainwt)) +
7777
#' geom_point() +
78-
#' coord_trans(x = "log10", y = "log10") +
78+
#' coord_transform(x = "log10", y = "log10") +
7979
#' theme_bw()
8080
#' t + annotation_logticks(scaled = FALSE)
8181
#'

R/coord-.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#' @section Coordinate systems:
22
#'
3-
#' All `coord_*()` functions (like `coord_trans()`) return a `Coord*`
3+
#' All `coord_*()` functions (like `coord_transform()`) return a `Coord*`
44
#' object (like `CoordTrans`).
55
#'
66
#' Each of the `Coord*` objects is a [ggproto()] object,
@@ -16,7 +16,7 @@
1616
#' - `backtransform_range(panel_params)`: Extracts the panel range provided
1717
#' in `panel_params` (created by `setup_panel_params()`, see below) and
1818
#' back-transforms to data coordinates. This back-transformation can be needed
19-
#' for coords such as `coord_trans()` where the range in the transformed
19+
#' for coords such as `coord_transform()` where the range in the transformed
2020
#' coordinates differs from the range in the untransformed coordinates. Returns
2121
#' a list of two ranges, `x` and `y`, and these correspond to the variables
2222
#' mapped to the `x` and `y` aesthetics, even for coords such as `coord_flip()`

0 commit comments

Comments
 (0)