Learn R Programming

scales (version 0.1.0)

seq_gradient_pal: Sequential colour gradient palette (continous).

Description

Sequential colour gradient palette (continous).

Usage

seq_gradient_pal(low = mnsl("10B 4/6"), high = mnsl("10R 4/6"), space = "Lab")

Arguments

low
colour for low end of gradient.
high
colour for high end of gradient.
space
colour space in which to calculate gradient. "Lab" usually best unless gradient goes through white.

Examples

Run this code
x <- seq(0, 1, length = 25)
show_col(seq_gradient_pal()(x))
show_col(seq_gradient_pal("white", "black")(x))

library(munsell)
show_col(seq_gradient_pal("white", mnsl("10R 4/6"))(x))

Run the code above in your browser using DataLab