stat: "bin_2d"

Rectangular 2D binning over continuous x and y. Publishes count/density and bin edges for geom_bin_2d tiles.

Usage

import { GGPlot, GeomBin2d } from "@ggsvelte/svelte";

<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
  <GeomBin2d stat="bin_2d" />
</GGPlot>
{
  "geom": "bin_2d",
  "stat": "bin_2d"
}

Generated columns (after_stat)

Resolve these with channel objects such as { stat: "count" } in aes.

  • count
  • density
  • ncount
  • ndensity

Default for geoms

Compatible geoms

Examples

← All stats · Geoms · Statistics and positions