Skip to content

Commit c8e2544

Browse files
authored
Mention transformation must be strictly monotonic (#5720)
1 parent c8df060 commit c8e2544

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

R/axis-secondary.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#' secondary axis, positioned opposite of the primary axis. All secondary
55
#' axes must be based on a one-to-one transformation of the primary axes.
66
#'
7-
#' @param transform A formula or function of transformation
7+
#' @param transform A formula or function of a strictly monotonic transformation
88
#'
99
#' @param trans `r lifecycle::badge("deprecated")`
1010
#'
@@ -205,7 +205,9 @@ AxisSecondary <- ggproto("AxisSecondary", NULL,
205205

206206
# Test for monotonicity
207207
if (!is_unique(sign(diff(full_range))))
208-
cli::cli_abort("Transformation for secondary axes must be monotonic.")
208+
cli::cli_abort(
209+
"Transformation for secondary axes must be strictly monotonic."
210+
)
209211
},
210212

211213
break_info = function(self, range, scale) {

man/sec_axis.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/_snaps/sec-axis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88

99
---
1010

11-
Transformation for secondary axes must be monotonic.
11+
Transformation for secondary axes must be strictly monotonic.
1212

0 commit comments

Comments
 (0)