expand {rampage} | R Documentation |
Create a calibrated color ramp object from color-tiepoint data.frames
Description
Create ramp palettes from fixed color positions.
Usage
expand(x = NULL, n, color = "color", z = "z", ...)
Arguments
x |
A |
n |
A single |
color |
A |
z |
A |
... |
Arguments passed to the |
Details
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.
Value
A calibramp
-class object (see description above).
Examples
library(rampage)
data(topos)
ramp <- expand(topos$havanna2, n=200)
plot(ramp)