expand | R Documentation |
Create ramp palettes from fixed color positions.
expand(x = NULL, n, color = "color", z = "z", ...)
x |
A |
n |
A single |
color |
A |
z |
A |
... |
Arguments passed to the |
The function creates objects of the S3 class calibramp
. The calibramp
-class lists have three elements: col
hexadecimal color values, mid
: z-values of midpoints (one for every color), and breaks
: separator borders between color values.
Color interpolation will be executed linearly, using colorRampPalette
, the order of the values will be forced to ascending, the values in mid
will be halfway between breaks.
A calibramp
-class object (see description above).
library(rampage)
data(topos)
ramp <- expand(topos$havanna2, n=200)
plot(ramp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.