HexBin

org.nspl.data.HexBin$
object HexBin

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
HexBin.type

Members list

Concise view

Value members

Concrete methods

def apply(data: Iterator[(Double, Double)], xlim: (Double, Double), ylim: (Double, Double), size: Double, log: Boolean): Seq[(Double, Double, Double)]

Hexagonal binning

Hexagonal binning

Algorithm: https://cran.r-project.org/web/packages/hexbin/vignettes/hexagon_binning.pdf page10 and: https://www.redblobgames.com/grids/hexagons/

Creates two Cartesian coordinate systems both with base (width,height) but with an offset origin Each integer valued coordinate (i,j) in those two coordinate systems are hexagon centers. Quickly find the 2 possible closest center of a point by taking advantage of the Cartesian coordinate system Tests the 2 candidates

Attributes