From 6d87b348b4ec71a0f48eca19e9984669f0d397be Mon Sep 17 00:00:00 2001 From: Thomas Lin Pedersen Date: Wed, 1 Nov 2023 12:23:16 +0100 Subject: [PATCH] Fix #386 --- R/trans.R | 13 ++++++------- man/trans_new.Rd | 13 ++++++------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/R/trans.R b/R/trans.R index 81826cef..6d260e76 100644 --- a/R/trans.R +++ b/R/trans.R @@ -1,11 +1,10 @@ #' Create a new transformation object #' #' A transformation encapsulates a transformation and its inverse, as well -#' as the information needed to create pleasing breaks and labels. The breaks -#' function is applied on the transformed range of the range, and it's -#' expected that the labels function will perform some kind of inverse -#' transformation on these breaks to give them labels that are meaningful on -#' the original scale. +#' as the information needed to create pleasing breaks and labels. The `breaks()` +#' function is applied on the un-transformed range of the data, and the +#' `format()` function takes the output of the `breaks()` function and return +#' well-formatted labels. #' #' @param name transformation name #' @param transform function, or name of function, that performs the @@ -13,10 +12,10 @@ #' @param inverse function, or name of function, that performs the #' inverse of the transformation #' @param breaks default breaks function for this transformation. The breaks -#' function is applied to the raw data. +#' function is applied to the un-transformed data. #' @param minor_breaks default minor breaks function for this transformation. #' @param format default format for this transformation. The format is applied -#' to breaks generated to the raw data. +#' to breaks generated on the un-transformed data. #' @param domain domain, as numeric vector of length 2, over which #' transformation is valued. The function in the `transform` argument is #' expected to be able to transform the `domain` argument. diff --git a/man/trans_new.Rd b/man/trans_new.Rd index ccac45a8..b1dc171f 100644 --- a/man/trans_new.Rd +++ b/man/trans_new.Rd @@ -31,12 +31,12 @@ transformation} inverse of the transformation} \item{breaks}{default breaks function for this transformation. The breaks -function is applied to the raw data.} +function is applied to the un-transformed data.} \item{minor_breaks}{default minor breaks function for this transformation.} \item{format}{default format for this transformation. The format is applied -to breaks generated to the raw data.} +to breaks generated on the un-transformed data.} \item{domain}{domain, as numeric vector of length 2, over which transformation is valued. The function in the \code{transform} argument is @@ -44,11 +44,10 @@ expected to be able to transform the \code{domain} argument.} } \description{ A transformation encapsulates a transformation and its inverse, as well -as the information needed to create pleasing breaks and labels. The breaks -function is applied on the transformed range of the range, and it's -expected that the labels function will perform some kind of inverse -transformation on these breaks to give them labels that are meaningful on -the original scale. +as the information needed to create pleasing breaks and labels. The \code{breaks()} +function is applied on the un-transformed range of the data, and the +\code{format()} function takes the output of the \code{breaks()} function and return +well-formatted labels. } \seealso{ \Sexpr[results=rd,stage=build]{scales:::seealso_trans()}