GeomDotplot

Dotplot geometry: stacked dots along a continuous x axis (histodot subset). Do not map aes.y — the bindot stat computes stack positions.

Defaults

geom
dotplot
default stat
bindot
default position
identity
params type
DotplotParams

Svelte component

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

<GGPlot data={rows} aes={{ x: "x" }}>
  <GeomDotplot />
</GGPlot>

JSON layer

{
  "geom": "dotplot",
  "stat": "bindot"
}

Params

bins

number

Number of bins (integer ≥ 1). Default 30 — advisory when neither bins nor binwidth is set. Overridden by binwidth.

binwidth

number

Histodot bin width in data units (must be greater than 0). Takes precedence over bins. Also drives default point diameter via the x scale.

boundary

number

Align a bin edge to this value (mutually exclusive with center).

center

number

Align a bin center to this value (mutually exclusive with boundary).

closed

"right" | "left"

Which side of each bin is closed: "right" (default, (lo, hi]) or "left" ([lo, hi)).

stackdir

"up" | "down" | "center" | "centerwhole"

Stack direction: "up" (default), "down", "center", or "centerwhole" (integer-aligned center).

stackratio

number

Relative spacing between stacked dots (must be greater than 0). Default 1.

dotsize

number

Multiplier on diameter derived from binwidth × x-scale (must be greater than 0). Default 1. Ignored when params.size is set.

size

number

Point radius in px (must be greater than 0). When set, overrides binwidth-derived sizing.

alpha

number

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

shape

"circle" | "triangle" | "square" | "diamond" | "plus" | "cross"

Point shape. One of "circle", "triangle", "square", "diamond", "plus", "cross". Default "circle".

Allowed stats

Allowed positions

Examples

← All geoms · Getting started