pev_fcont_rescale: Rescale input to continuous-palette function

Description Usage Arguments Value Examples

View source: R/continuous.R

Description

Rescale input to continuous-palette function

Usage

1
pev_fcont_rescale(.fcont, limits = c(0, 1))

Arguments

.fcont

object that can be coerced to pev_fcont, when called with a numeric vector with values between 0 and 1, returns the corresponding (hex-code) values.

limits

numeric vector of length 2, rescaling parameters. The input values to the returned function, c(0, 1), are mapped to limits as inputs to the input function.

Value

function with S3 class pev_fcont, when called with a numeric vector with values between 0 and 1, returns the corresponding (hex-code) values.

Examples

1
2
3
4
5
6
  # Create sequential-palette function
  fcont_purple <- pev_fcont("Purples 3")
  fcont_purple

  # Rescale palette-function
  pev_fcont_rescale(fcont_purple, limits = c(0.25, 0.75))

ijlyttle/paleval documentation built on Dec. 25, 2019, 9:17 a.m.