scale_si_unit: Scale format to International System of Units (k, M, )

View source: R/scales.R

scale_si_unitR Documentation

Scale format to International System of Units (k, M, )

Description

#' [Stable] Format a vector of numeric values according to the International System of Units.

(ie: 1,000 becomes "1 k", 2,500 becomes "2.5 k") See: http://en.wikipedia.org/wiki/SI_prefix

Usage

scale_si_unit(sep = " ", ...)

Arguments

sep

Seperator to use between number and unit (defaults to " ")

...

Passed by ggplot2::scale_*_continuous

Value

Used with scale_*_continuous, returns formatted axis labels

Examples

## Not run: 
ggplot(diamonds, aes(x = price)) + geom_density() + scale_x_continuous(labels = scale_si_unit())

## End(Not run)

IntegralEnvision/integral documentation built on Nov. 4, 2024, 2 p.m.