View source: R/ch_color_gradient.R
| ch_color_gradient | R Documentation | 
set colour gradient
ch_color_gradient(
  x,
  colors = c("darkred", "red", "white", "green", "darkgreen"),
  colsteps = 100,
  climits = NULL
)
| 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 | 
vector of colors
Paul Whitfield
cxin <- c(0, 1, 1, 3, 4, 5, 10)
cxout <- ch_color_gradient(cxin)
#[1] "#8B0000" "#B50000" "#B50000" "#FF2B2B" "#FF9292"
#[6] "#FFF9F9" "#006400"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.