bm_pixmap {bittermelon}R Documentation

Bittermelon pixmap matrix object

Description

bm_pixmap() creates an S3 matrix subclass representing a pixmap.

Usage

bm_pixmap(x)

Arguments

x

Object to be converted to bm_pixmap(). If not already a color string matrix it will be cast to one by as_bm_pixmap().

Details

Value

A character matrix of color strings with a “bm_pixmap” subclass.

Supported S3 methods

See Also

as_bm_pixmap(), is_bm_pixmap()

Examples

# Bottom left pixel is **first** row and first column
pm <- bm_pixmap(matrix(c("red", "blue", "green", "black"),
                nrow = 2L, byrow = TRUE))
plot(pm)

[Package bittermelon version 2.0.2 Index]