smooth_cols: Produce smooth colours from values

View source: R/main.R

smooth_colsR Documentation

Produce smooth colours from values

Description

Read in continuous values between xmin and xmax and return colours associated with these values, taken from a smoothly varying scale.

Usage

smooth_cols(
  x,
  xmin = min(x, na.rm = T),
  xmax = max(x, na.rm = T),
  n_levels = 1000,
  raw_cols = col_tim()
)

Arguments

x

values from which to obtain colours.

xmin, xmax

minimum and maximum values of x.

n_levels

number of colours in palette.

raw_cols

colours that make up the palette.


bobverity/bobfunctions2 documentation built on July 4, 2023, 8:55 p.m.