| nr_point | R Documentation |
Draw points on a native raster image
nr_point(nr, x, y, color = "black", use_alpha = TRUE)
nr |
native raster image |
x, y |
Vectors of point coordinates |
color |
Vector of colors |
use_alpha |
Use alpha channel when drawing? Logical. Default: TRUE |
Invisibly return the supplied native raster image which was been modified in-place
w <- 200
h <- 150
nr <- nr_new(w, h, 'grey80')
coords <- expand.grid(x = seq(w) - 1, y = seq(h) - 1)
cols <- sample(rainbow(nrow(coords)))
nr_point(nr, x = coords$x, y = coords$y, color = cols)
plot(nr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.