Learn R Programming

berryFunctions (version 1.11.0)

seqPal: Sequential color palette

Description

Sequential color palette from yelow to red or yellow to blue or custom colors.

Usage

seqPal(n = 12, reverse = FALSE, alpha = 1, extr = FALSE, yb = FALSE, yr = FALSE, gb = FALSE, colors = NULL, ...)

Arguments

n
Number of colors. DEFAULT: 12
reverse
Reverse colors? DEFAULT: FALSE
alpha
Transparency (0=transparent, 1=fully colored). DEFAULT: 1
extr
Should colors span possible range more extremely? If TRUE, it has very light yellow and very dark blue values included, using the result from RColorBrewer::brewer.pal(9, "YlGnBu"). DEFAULT: FALSE
yb
Should colors be in yellow-blue instead of the internal (nice) default? DEFAULT: FALSE
yr
Should colors be in yellow-red instead of the default? DEFAULT: FALSE
gb
Should colors be in green-blue instead of the default? DEFAULT: FALSE
colors
If not NULL, a color vector used in colorRampPalette. DEFAULT: NULL
...
Further arguments passed to colorRamp

Value

Character string vector with color names

See Also

showPal, divPal, addAlpha, colorRampPalette, package RColorBrewer

Examples

Run this code

plot(rep(1,12),  pch=16, cex=5, col=seqPal(12), xaxt="n")
showPal()
 

Run the code above in your browser using DataLab