ternary_image: Display a Color Image

ternary_imageR Documentation

Display a Color Image

Description

Creates a grid of colored triangles with colors corresponding to the output of a function.

Usage

ternary_image(f, ...)

## S4 method for signature 'function'
ternary_image(f, n = 48, palette = NULL, ...)

Arguments

f

A function that takes three arguments (x, y and z coordinates) and returns a numeric vector (see tile_bin(), tile_density(), tile_interpolate()).

...

Further parameters to be passed to f.

n

A length-one integer vector specifying the maximum number of tiles on each axis.

palette

A function that takes a single numeric vector (the output of f) as argument and returns a vector of color. If NULL, the default color scheme will be used. If FALSE, the output of f is used as colors.

Value

ternary_image() is called it for its side-effects.

Author(s)

N. Frerebeau

See Also

Other geometries: ternary_arrows(), ternary_crosshairs(), ternary_labels(), ternary_lines(), ternary_points(), ternary_polygon(), ternary_segments(), ternary_text()

Examples

## RGB
ternary_plot(NULL, xlab = "Red", ylab = "Green", zlab = "Blue")
ternary_image(f = rgb, n = 20, palette = FALSE)

isopleuros documentation built on April 3, 2025, 7:40 p.m.