twocolorpal {broman} | R Documentation |
Create vector of colors from blue to white to red
Description
Create a two-color palette from one color to another through some third color
Usage
twocolorpal(colors = c("slateblue", "white", "violetred"), n = 256, ...)
Arguments
colors |
Vector of three colors |
n |
Number of colors in output. |
... |
Passed to |
Value
Vector of colors, from blue to white to red
See Also
Examples
x <- matrix(rnorm(100, 0.5), ncol=10)
mxabs <- max(abs(x))
image(x, col=twocolorpal(), zlim=c(-mxabs, mxabs))
[Package broman version 0.84 Index]