| 1 |
\name{bpy.colors} |
| 2 |
\alias{bpy.colors} |
| 3 |
\title{ blue-pink-yellow color scheme, which also prints well on |
| 4 |
black/white printers } |
| 5 |
\description{ Create a vector of `n' ``contiguous'' colors. } |
| 6 |
\usage{ bpy.colors(n = 100, cutoff.tails = 0.1, alpha = 1.0) } |
| 7 |
\arguments{ |
| 8 |
\item{n}{number of colors (>= 1) to be in the palette} |
| 9 |
\item{cutoff.tails}{tail fraction to be cut off on each side. If 0, |
| 10 |
this palette runs from black to white; by cutting off the tails, it runs |
| 11 |
from blue to yellow, which looks nicer. } |
| 12 |
\item{alpha}{numeric; alpha transparency, 0 is fully transparent, 1 is opaque. } |
| 13 |
} |
| 14 |
\value{ A character vector, `cv', of color names. This can be used |
| 15 |
either to create a user-defined color palette for subsequent graphics |
| 16 |
by `palette(cv)', a `col=' specification in graphics functions or in |
| 17 |
`par'. } |
| 18 |
\author{ unknown; the pallette was posted to gnuplot-info a few |
| 19 |
decades ago; R implementation Edzer Pebesma, |
| 20 |
\email{[email protected]}} |
| 21 |
\note{ This color map prints well on black-and-white printers. } |
| 22 |
\seealso{\link{rainbow}, \link{cm.colors}} |
| 23 |
\examples{ |
| 24 |
bpy.colors(10) |
| 25 |
p <- expand.grid(x=1:30,y=1:30) |
| 26 |
p$z <- p$x + p$y |
| 27 |
coordinates(p) <- c("x", "y") |
| 28 |
gridded(p) <- TRUE |
| 29 |
image(p, col = bpy.colors(100), asp = 1) |
| 30 |
# require(lattice) |
| 31 |
# trellis.par.set("regions", list(col=bpy.colors())) # make this default pallette |
| 32 |
} |
| 33 |
\keyword{color} |