GeomErrorbar

Errorbar geometry: a vertical range with caps at ymin and ymax, one per data row (identity stat) or per x group (summary stat).

Defaults

geom
errorbar
default stat
identity
default position
identity
params type
ErrorbarParams

Svelte component

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

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

JSON layer

{
  "geom": "errorbar"
}

Params

width

number

Cap width as a fraction of the band step. Must be greater than 0 and at most 1. Default 0.9.

linewidth

number

Stroke width in px. Must be greater than 0. Default 1.

alpha

number

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

fun

"mean" | "median" | "sum"

STAT SUMMARY ONLY: the center summary of y per x group: "mean" (default), "median", or "sum". With "mean" and no funMin/funMax, the bounds default to mean ± standard error.

funMin

SummaryFun

STAT SUMMARY ONLY: summary function for the lower bound (ymin). Overrides the mean_se default.

funMax

SummaryFun

STAT SUMMARY / SUMMARY_BIN: summary function for the upper bound (ymax). Overrides the mean_se default.

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".

Allowed stats

Allowed positions

Examples

← All geoms · Getting started