Learn R Programming

CSHShydRology (version 1.4.2)

ch_color_gradient: ch_color_gradient

Description

set colour gradient

Usage

ch_color_gradient(
  x,
  colors = c("darkred", "red", "white", "green", "darkgreen"),
  colsteps = 100,
  climits = NULL
)

Value

vector of colors

Arguments

x

array of variable

colors

an array of colours to form the desired gradient. Default is ("darkred", "red", "white", "green", "darkgreen")

colsteps

number of steps to be used in gradient, default is 100.

climits

provide specific limits for common scaling

Author

Paul Whitfield

Examples

Run this code
cxin <- c(0, 1, 1, 3, 4, 5, 10)
cxout <- ch_color_gradient(cxin)
#[1] "#8B0000" "#B50000" "#B50000" "#FF2B2B" "#FF9292"
#[6] "#FFF9F9" "#006400"

Run the code above in your browser using DataLab