GeomRaster

Raster geometry: equal-cell grid at (x, y) with fill; optimized dense heatmaps without per-cell strokes. Irregular spacing warns and suggests geom tile.

Defaults

geom
raster
default stat
identity
default position
identity
params type
RasterParams

Svelte component

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

<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
  <GeomRaster />
</GGPlot>

JSON layer

{
  "geom": "raster"
}

Params

alpha

number

Raster opacity. Must be between 0 and 1 (inclusive). Default 1.

hjust

number

Horizontal justification of each cell over its x center (0–1). Default 0.5.

vjust

number

Vertical justification of each cell over its y center (0–1). Default 0.5.

interpolate

boolean

Interpolation between cells. Only false (nearest / no interpolation) is supported.

Allowed stats

Allowed positions

Examples

← All geoms · Getting started