Learn R Programming

barsurf (version 0.7.0)

52_predefined_litmus_objects: Predefined Litmus Objects

Description

Functions that wrap the main litmus constructor, with predefined colors.

Usage

gold.litmus (a=0, b=1)
blue.litmus (a=0, b=1)
green.litmus (a=0, b=1)
heat.litmus (a=0, b=1)

blue.litmus.hcv (a=0, b=1) green.litmus.hcv (a=0, b=1) blue.litmus.flow (a=0, b=1) green.litmus.flow (a=0, b=1)

rainbow.litmus (a=0, b=1, …, c=42.5, l=75, start=65, end=315) rainbow.litmus.2 (a=0, b=1, …, c=50, l=70, start=0, end=360) glass.litmus (a=0, b=1, alpha=0.3, …, c=42.5, l=62.5, start=42.5, end=260)

hot.and.cold (t=0, d=1, …, hot.hue=35, cold.hue=255)

Arguments

a, b

Numerics, the lower and upper limits.

c, l, start, end

Same as colorspace::rainbow_hcl.

alpha

A numeric vector giving the alpha component. If it has two or more values, then each alpha value is assigned to each color.

t

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.

d

Numeric of length one or two, giving the distance about the transition point.

hot.hue, cold.hue

Numerics, the hot and cold hues.

Ignored.

Value

All functions return litmus objects. (Except for hot.and.cold, which returns a mlitmus object).

Details

Most of these functions wrap the litmus function.

The rainbow.litmus and rainbow.litmus.2 functions are based on colorspace::rainbow_hcl.

References

Refer to the vignette for an overview, references and better examples.

See Also

Main Plotting Functions

Functional Versions Which take a function as their main argument.

Global Options

litmus,mlitmus, litmus.fit

Predefined Litmus-Fitting Functions

Examples

Run this code
# NOT RUN {
colf1 <- blue.litmus (-1, 1)
colf2 <- hot.and.cold ()

p0 <- par (mfrow = c (2, 1) )
plot (colf1)
plot (colf2)
par (p0)

u <- seq (-1, 1,, 5)
colf1 (u)
colf2 (u)
# }

Run the code above in your browser using DataLab