Functions that wrap the main litmus-fitting function, with predefined colors.
gold.litmus.fit (x, …, reverse=FALSE, equalize=0.85)
blue.litmus.fit (x, …, reverse=FALSE, equalize=0.85)
green.litmus.fit (x, …, reverse=FALSE, equalize=0.85)
heat.litmus.fit (x, …, reverse=FALSE, equalize=0.85)blue.litmus.fit.hcv (x, …, reverse=FALSE, equalize=0.85)
green.litmus.fit.hcv (x, …, reverse=FALSE, equalize=0.85)
blue.litmus.fit.flow (x, …, reverse=FALSE, equalize=0.85)
green.litmus.fit.flow (x, …, reverse=FALSE, equalize=0.85)
gold.litmus.fit.lum (x, …, reverse=FALSE, equalize=0.85)
blue.litmus.fit.lum (x, …, reverse=FALSE, equalize=0.85)
green.litmus.fit.lum (x, …, reverse=FALSE, equalize=0.85)
purple.litmus.fit.lum (x, …, reverse=FALSE, equalize=0.85)
heat.litmus.fit.lum (x, …, reverse=FALSE, equalize=0.85)
rainbow.litmus.fit (x, …, c=42.5, l=75, start=65, end=315,
equalize=0.85)
rainbow.litmus.fit.2 (x, …, c=50, l=70, start=0, end=360,
equalize=0.85)
glass.rainbow.fit (x, alpha=0.3, …, c=42.5, l=62.5, start=42.5, end=260,
equalize=0.85)
hot.and.cold.fit (x, …, t=0, symetric=TRUE, hot.hue=35, cold.hue=255,
equalize=0.85)
A numeric vector.
Logical, reverse the order of the colors.
Numeric, between zero and one, refer to details, for litmus.fit.
Same as colorspace::rainbow_hcl.
A numeric vector giving the alpha component. If it has two or more values, then each alpha value is assigned to each knot.
Numeric of length one or two, giving the transition points between "hot" and cold". Two points can be used for a softer effect, but they should be relatively close.
Logical, if true, the hot and cold sides should be relatively symetrical.
Numerics, the hot and cold hues.
Ignored.
All functions return litmus objects. (Except for hot.and.cold.fit, which returns a mlitmus object).
Most of these functions wrap the litmus.fit function.
The rainbow.litmus.fit and rainbow.litmus.fit.2 functions are based on colorspace::rainbow_hcl.
Refer to the vignette for an overview, references and better examples.
Functional Versions Which take a function as their main argument.
# NOT RUN {
x <- rnorm (30)
colf1 <- blue.litmus.fit (x)
colf2 <- hot.and.cold.fit (x)
p0 <- par (mfrow = c (2, 1) )
plot (colf1)
plot (colf2)
par (p0)
u <- seq (min (x), max (x),, 5)
colf1 (u)
colf2 (u)
# }
Run the code above in your browser using DataLab