twocolorpal | R Documentation |
Create a two-color palette from one color to another through some third color
twocolorpal(colors = c("slateblue", "white", "violetred"), n = 256, ...)
colors |
Vector of three colors |
n |
Number of colors in output. |
... |
Passed to |
Vector of colors, from blue to white to red
revgray()
x <- matrix(rnorm(100, 0.5), ncol=10)
mxabs <- max(abs(x))
image(x, col=twocolorpal(), zlim=c(-mxabs, mxabs))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.