File: smoothColors.Rd

package info (click to toggle)
r-cran-plotrix 3.2-6-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,136 kB
  • sloc: makefile: 3
file content (34 lines) | stat: -rwxr-xr-x 1,229 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
\name{smoothColors}
\alias{smoothColors}
\title{Build a vector of color values}
\usage{
 smoothColors(...,alpha=NA)
}
\arguments{
 \item{...}{an arbitrary sequence of color names and integers beginning
  and ending with a color name.}
 \item{alpha}{optional \samp{alpha} (transparency) value.}
}
\description{
 \samp{smoothColors} calculates a sequence of colors. If two color names 
  in the arguments are separated by a number, that number of interpolated
  colors will be inserted between the two color endpoints. Any number of
  color names and integers may be passed, but the last argument must be
  a color name. If more than one integer appears between two color names,
  only the first will be used in the interpolation and the others will be
  ignored.
}
\value{A vector of hexadecimal color values as used by \samp{col}.}
\note{
 For more R functions that transform numeric values into
 colors or produce colors that can be used to represent values, see the 
 \pkg{colourschemes} package.
}
\author{Barry Rowlingson}
\seealso{\link{color.gradient},\link{rgb}}
\examples{
 plot(1:10,main="Test opaque colors",type="n",axes=FALSE)
 box()
 rect(1:7,1:7,3:9,3:9,col=smoothColors("red",2,"green",2,"blue"))
}
\keyword{misc}