colr | R Documentation |
Create a range of colors between two specified colors.
colr(x, fromcolname, tocolname)
x |
A numeric vector, the values to be assigned colors. |
fromcolname |
A character or numeric scalar, indicating the color to use for the
lowest value in |
tocolname |
A character or numeric scalar, indicating the color to use for the highest
value in |
colors
, palette
.
x <- 1:10 plot(x, x, pch=16, col=colr(x, "blue", "yellow"), cex=4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.