Learn R Programming

barsurf (version 0.5.0)

07_barface_objects: Barface Objects

Description

Color functions for 3d bar plots.

Usage

barface (coltv, colfv, …, color.space="sRGB")

heat.barface () gold.barface () blue.barface () green.barface () purple.barface ()

Arguments

coltv, colfv

Length-3 or length-4 numeric vectors, representing colors.

color.space

String, a color space, refer to the details section for litmus objects.

Ignored.

Value

All these functions return barface objects.

Refer to details.

Details

A barface object is a function that maps a logical vector to a character vector, representing R colors. (Noting that these functions return barface objects, so you call these functions, and then if necessary you can evaluate the resulting function).

The coltv defines a color, for true, which plot_bar uses for the tops of bars. The colfv defines a color, for false, which plot_bar uses for the sides of bars. It's possible to omit the colfv argument, in which case, the resulting color will be similar to the top color, but lighter.

The other functions (e.g. heat.barface) are wrappers, that create barface objects with particular colors.

References

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

See Also

litmus

Examples

Run this code
# NOT RUN {
colf <- barface (c (1, 0, 0), c (0, 0, 1) )
plot (colf)

#evaluate
colf (c (TRUE, FALSE) )
# }

Run the code above in your browser using DataLab