R/scale-constructor.R

Defines functions number_scale

#' Formatted Scale Constructor
#'
#' The scale_xxx_xxx_de family of functions makes it easy to style (numeric)
#' axes using standard number formatting used in Germany.
#'
#' @inheritParams ggplot2::continuous_scale
#' @inheritParams scales::label_number
#'
#' @noRd
number_scale <- function(aesthetics, scale_name, palette,
                         name = waiver(),
                         breaks = waiver(),
                         minor_breaks = waiver(),
                         guide = waiver(),
                         n.breaks = NULL,
                         labels = waiver(),
                         limits = NULL,
                         expand = c(0.01, 0),
                         oob = censor,
                         na.value = NA_real_,
                         trans = "identity",
                         position = "bottom",
                         super = ScaleContinuous,
                         accuracy = 1, scale = 1,
                         prefix = "", suffix = "",
                         big.mark = " ", decimal.mark = ".",
                         trim = TRUE, ...) {
  continuous_scale(
    aesthetics = aesthetics,
    palette = palette,
    name = name,
    breaks = breaks,
    n.breaks = n.breaks,
    minor_breaks = minor_breaks,
    labels = labels,
    limits = limits,
    expand = expand,
    oob = oob,
    na.value = na.value,
    transform = trans,
    guide = guide,
    position = position,
    super = super
  )
}

Try the countryscales package in your browser

Any scripts or data that you put into this service are public.

countryscales documentation built on Sept. 29, 2026, 5:09 p.m.