Render a 2D histogram with given points

scatter_points_histogram(
  xy,
  xlim = c(min(xy[, 1]), max(xy[, 1])),
  ylim = c(min(xy[, 2]), max(xy[, 2])),
  out_size = c(512L, 512L)
)

Arguments

xy

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

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).

Value

2D histogram with the points "counted" in appropriate pixels.