Skip to contents

This function is no longer used internally as it's unnecessary for scico divergent palettes. But it can be useful when using divergent palettes outside scico where one must specify beginning and end but not midpoint, to override the default palette.

Usage

getDivergeRange(values, diverge_center = 0)

Arguments

values

Numeric vector to be colored.

diverge_center

Value to center on, defaults to 0.

Value

A numeric vector of length 2, the first element is for beginning, and the second for end. The values are between 0 and 1.

Examples

v <- rnorm(10)
getDivergeRange(v, diverge_center = 0)
#> [1] 0.1643015 1.0000000