GeomPoint

Point geometry: one mark per data row. Use for scatter plots, dot plots, bubbles, and correlation views.

Defaults

geom
point
default stat
identity
default position
identity
params type
PointParams

Svelte component

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

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

JSON layer

{
  "geom": "point"
}

Params

alpha

number

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

size

number

Point radius in px. Must be greater than 0. Default 2.5.

shape

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

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

bins

number

STAT SUMMARY_BIN ONLY: number of bins (integer ≥ 1). Default 30 — advisory. Overridden by binwidth.

binwidth

number

STAT SUMMARY_BIN ONLY: bin width in data units (must be greater than 0). Takes precedence over bins.

boundary

number

STAT SUMMARY_BIN ONLY: align a bin EDGE with this x value. Mutually exclusive with center.

center

number

STAT SUMMARY_BIN ONLY: align a bin CENTER with this x value. Mutually exclusive with boundary.

closed

"right" | "left"

STAT SUMMARY_BIN ONLY: which edge of each bin is inclusive: "right" (default) or "left".

fun

"first" | "last" | "mean" | "median" | "min" | "max" | "sum"

SUMMARY_BIN center fun (mean/median/sum;) or MANUAL named transform (first|last|mean|median|min|max|sum;). Required when stat is "manual".

funMin

SummaryFun

STAT SUMMARY_BIN ONLY: lower bound summary (ymin).

funMax

SummaryFun

STAT SUMMARY_BIN ONLY: upper bound summary (ymax).

Allowed stats

Allowed positions

Examples

← All geoms · Getting started