scatter_histogram: scatter_histogram

View source: R/scatter_histogram.R

scatter_histogramR Documentation

scatter_histogram

Description

Create histogram from given point coordinates.

Usage

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

Arguments

xy

2-column float matrix with point coordinates. As usual with rasters in R, X axis grows right, and Y axis grows DOWN. Flipping ylim causes the "usual" mathematical behavior.

xlim

Float limits as usual (position of the first pixel on the left/top, and the last pixel on the right/bottom), 2-element vector. You can easily flip the top/bottom to the "usual" mathematical system by flipping the ylim vector.

ylim

Float limits as usual (position of the first pixel on the left/top, and the last pixel on the right/bottom), 2-element vector. You can easily flip the top/bottom to the "usual" mathematical system by flipping the ylim vector.

out_size

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

Value

Float histogram with the result (values ~ 0-1).


Teri934/scattermore2 documentation built on April 9, 2022, 12:44 a.m.