scatter_points_rgbwt: scatter_points_rgbwt

View source: R/scatter_points_rgbwt.R

scatter_points_rgbwtR Documentation

scatter_points_rgbwt

Description

Render colored points into a RGBWT bitmap

Usage

scatter_points_rgbwt(
  xy,
  xlim = c(min(xy[, 1]), max(xy[, 1])),
  ylim = c(min(xy[, 2]), max(xy[, 2])),
  out_size = c(512, 512),
  RGBA = c(0, 0, 0, 255),
  map = NULL,
  palette = NULL
)

Arguments

xy

2-column matrix with N point coordinates (X and Y) in rows.

xlim, ylim

2-element vector of rendered area limits (position of the first pixel on the left/top, and the last pixel on the right/bottom). You can flip the image coordinate system by flipping the ⁠*lim⁠ vectors.

out_size

2-element vector size of the result raster, defaults to c(512L,512L).

RGBA

Point colors. Either a 4-element vector that specifies the same color for all points, or 4-by-N matrix that specifies color for each of the individual points. Color is specified using integer RGBA; i.e. the default black is c(0,0,0,255).

map

Vector with N integer indices to palette. Overrides RGBA-based coloring.

palette

Matrix 4-by-K matrix of RGBA colors used as a palette lookup for the map that gives the point colors. K is at least max(map). Notably, using a palette may be faster than filling and processing the whole RGBA matrix.

Value

A RGBWT array with the rendered points.


scattermore documentation built on July 9, 2023, 5:34 p.m.