seqPal | R Documentation |
Sequential color palette from yellow to blue or custom colors.
seqPal(
n = 100,
reverse = FALSE,
alpha = 1,
extr = FALSE,
yb = FALSE,
yr = FALSE,
gb = FALSE,
b = FALSE,
colors = NULL,
logbase = 1,
...
)
n |
Number of colors. DEFAULT: 100 |
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 |
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 |
b |
Should colors be in an increasingly saturated blue? DEFAULT: FALSE |
colors |
If not NULL, a color vector used in |
logbase |
If |
... |
Further arguments passed to |
Character string vector with color names
Berry Boessenkool, berry-b@gmx.de, Jan 2016
showPal
, divPal
, catPal
, addAlpha
,
colorRampPalette
, package RColorBrewer
plot(rep(1,12), pch=16, cex=5, col=seqPal(12), xaxt="n")
showPal()
# nonlinear color scale (use colPoints + see classify for more options):
v <- rescale(volcano^30)
image(v, col=seqPal(1000), asp=1); colPointsLegend(v, nbins=1000)
image(v, col=seqPal(1000, logbase=1.007), asp=1)
colPointsLegend(v, col=seqPal(1000, logbase=1.007))
plot( rep(1, 1000), pch=15, cex=3, col=seqPal(1000), ylim=c(0.99, 1.01), ylab="logbase", las=1)
for(b in seq(0.99, 1.01, len=30))
points(rep(b, 1000), pch=15, cex=1, col=seqPal(1000, logbase=b))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.