Description Usage Arguments Author(s) See Also Examples
View source: R/string.to.color.R
Create a gradiented legend
1 2 |
y |
the variable used to create the gradient, typically in |
yrange |
The range of y values. If y is supplied, it will pulls these from the actual y values. |
cols |
The color gradients to be used that are passed to |
location |
The location of the subplot, expressed in fractions of the entire plot (left x, right x, bottom y, top y). |
n |
the number of values used for the gradient. Higher numbers make a higher resolution |
... |
other arguments passed to image |
Dustin Fife
number.to.colors
colorRampPalette
1 2 3 4 | y = rnorm(100); x = .6*y + rnorm(100,0,sqrt(1-.6^2))
randnum = runif(100)
plot(x,y, col=number.to.colors(randnum), pch=16)
gradient.legend(randnum, xlab="", ylab="")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.