Draw points on a native raster image

nr_point(nr, x, y, color = "black", use_alpha = TRUE)

Arguments

nr

native raster image

x, y

Vectors of point coordinates

color

Vector of colors

use_alpha

Use alpha channel when drawing? Logical. Default: TRUE

Value

Invisibly return the supplied native raster image which was been modified in-place

Examples

N <- 20
nr <- nr_new(N, N, 'grey80')
nr_point(nr, x = seq(N), y = seq(N), color = rainbow(N)) 
plot(nr)