rampInterpolate: Interpolated ramp colour scheme

Description Usage Arguments Details Value Author(s) Examples

View source: R/rampInterpolate.R

Description

Returns a colour scheme that interpolates colours between values.

Usage

1
rampInterpolate(limits, ramp, ...)

Arguments

limits

A vector, the min and max of which specify the ramp limits.

ramp

A vector of colour values that are passed to colorRamp

...

Further arguments passed to colorRamp

Details

The rampInterpolate colour scheme maps from the min and max of the limits argument to a colour ramp generated by the standard R colorRamp function.

Value

A colourscheme function that interpolates in a colour ramp.

Author(s)

Barry Rowlingson <b.rowlingson@lancaster.ac.uk>

Examples

1
2
3
4
5
6
7
8
9
rs = rampInterpolate ( limits =c(-2 , 2),
          ramp = c("red", " yellow ", " blue "))
rs(0)
### show the difference between linear and spline interp:
rs2 = rampInterpolate ( limits =c(-2 , 2),
          ramp = c("red", " yellow ", " blue "),
          interpolate="spline")
rs(1)
rs2(1)

colourschemes documentation built on May 2, 2019, 4:56 p.m.