Learn R Programming

barsurf (version 0.7.0)

32_multi-litmus_objects: Multi-Litmus Objects

Description

Color functions that combine multiple litmus objects.

Usage

mlitmus (…, default.color="#D0D0D0", na.color=default.color)

Arguments

One or more litmus objects.

default.color

String, color that is returned for values outside the litmus objects' knots.

na.color

String, color that is returned for NA values.

Value

An mlitmus object.

Details

This function creates a color function similar to a litmus object, containing one or more litmus objects. (Noting that these functions return mlitmus objects, so you call these functions, and then if necessary you can evaluate the resulting function).

The color function works out which litmus object to use for each input value.

An example is using one set of colors for positive values and another set of colors for negative values.

Note that it's possible for litmus objects to overlap. This may be changed, so this feature should not be used inside packages.

References

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

See Also

litmus, litmus.fit

Predefined Litmus Objects, Predefined Litmus-Fitting Functions With predefined colors.

hot.and.cold

Examples

Run this code
# NOT RUN {
colf <- mlitmus (blue.litmus (0, -1), green.litmus (0, 1) )

plot (colf)
colf (c (-1, 0, 1) )
# }

Run the code above in your browser using DataLab