stat: "bin_hex"

Hexagonal 2D binning over continuous x and y. Publishes count/density columns for geom_hex heatmaps.

Usage

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

<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
  <GeomHex stat="bin_hex" />
</GGPlot>
{
  "geom": "hex",
  "stat": "bin_hex"
}

Generated columns (after_stat)

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

  • count
  • density
  • ncount
  • ndensity

Default for geoms

Compatible geoms

← All stats · Geoms · Statistics and positions