View source: R/palette-rescale.R
pth_palette_rescale_reverse | R Documentation |
The purpose of these functions is to rescale the input to palette functions.
Inputs to palette functions must be 0 <= x <= 1
. A rescaler maps x
to
x'
such that 0 <= x' <= 1
; a mapping function will be monotonic.
pth_palette_rescale_reverse()
reverses the input, so that x
maps to
1 - x
.
pth_palette_rescale_domain()
expands a part of input domain, so that x
maps to domain
.
The other rescaling functions, pth_palette_rescale_euclid()
and
pth_palette_rescale_metric()
, are used so to rescale a palette function
such that a constant change in input, x
, results in a constant change
in color, for a given definition of "change in color".
pth_palette_rescale_reverse(palette) pth_palette_rescale_domain(palette, domain = c(0, 1)) pth_palette_rescale_euclid( palette, tolerance = 1e-04, non_luminance_weight = 1, transformer = identity, ... ) pth_palette_rescale_metric( palette, tolerance = 1e-04, method = c("cie2000", "cie94", "cie1976", "cmc") )
palette |
|
domain |
|
tolerance |
|
non_luminance_weight |
|
transformer |
|
... |
additional arguments passed on to |
method |
|
function
with the same S3 classes as palette
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.