GeomHex
Hexagonal bin heatmap: partitions continuous x×y into a hexagonal lattice and maps fill to bin count by default.
Defaults
- geom
hex- default stat
bin_hex- default position
identity- params type
HexParams
Svelte component
import { GGPlot, GeomHex } from "@ggsvelte/svelte";
<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
<GeomHex />
</GGPlot> JSON layer
{
"geom": "hex",
"stat": "bin_hex"
} Params
binsnumberApproximate number of hex bins across the x range. Default 30.
dropbooleanWhen true (default), omit zero-count hexes from the output.
alphanumberHex opacity. Must be between 0 and 1 (inclusive). Default 1.
linewidthnumberOutline stroke width in px when color is set. Default 0 (no outline).
Allowed stats
bin_hexdefault
Allowed positions
identitydefault