Skip to content

gridify

function gridify(
data,
method,
parameters?): GridifyStepsResult;

Defined in: gridify.ts:97

Removes overlaps in a scatterplot by snapping points onto a grid.

ParameterTypeDescription
datareadonly Point[]Input points as [x, y].
method"cmds"Which technique to apply. hilbert, gilbert and gosper use space filling curves; dgrid, cmds and nmap are reimplementations of other published techniques.
parameters?GridifyParametersMethod-specific options; see GridifyParameters.

GridifyStepsResult

const { positions } = gridify(data, "hilbert", { whitespace: 2 });
function gridify(
data,
method?,
parameters?): GridifyResult;

Defined in: gridify.ts:102

Removes overlaps in a scatterplot by snapping points onto a grid.

ParameterTypeDescription
datareadonly Point[]Input points as [x, y].
method?"hilbert" | "gilbert" | "gosper" | "gridfit" | "dgrid" | "nmap"Which technique to apply. hilbert, gilbert and gosper use space filling curves; dgrid, cmds and nmap are reimplementations of other published techniques.
parameters?GridifyParametersMethod-specific options; see GridifyParameters.

GridifyResult

const { positions } = gridify(data, "hilbert", { whitespace: 2 });