gridify
Call Signature
Section titled “Call Signature”function gridify( data, method, parameters?): GridifyStepsResult;Defined in: gridify.ts:97
Removes overlaps in a scatterplot by snapping points onto a grid.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
data | readonly 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? | GridifyParameters | Method-specific options; see GridifyParameters. |
Returns
Section titled “Returns”Example
Section titled “Example”const { positions } = gridify(data, "hilbert", { whitespace: 2 });Call Signature
Section titled “Call Signature”function gridify( data, method?, parameters?): GridifyResult;Defined in: gridify.ts:102
Removes overlaps in a scatterplot by snapping points onto a grid.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
data | readonly 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? | GridifyParameters | Method-specific options; see GridifyParameters. |
Returns
Section titled “Returns”Example
Section titled “Example”const { positions } = gridify(data, "hilbert", { whitespace: 2 });