32_multi-litmus_objects: Multi-Litmus Objects

Description Usage Arguments Details Value References See Also Examples

Description

Color functions that combine multiple litmus objects.

Usage

1
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.

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.

Value

An mlitmus object.

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

1
2
3
4
colf <- mlitmus (blue.litmus (0, -1), green.litmus (0, 1) )

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

barsurf documentation built on Jan. 20, 2021, 5:08 p.m.