GeomLinerange

Linerange geometry: a vertical stem from ymin to ymax without end caps.

Defaults

geom
linerange
default stat
identity
default position
identity
params type
LinerangeParams

Svelte component

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

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

JSON layer

{
  "geom": "linerange"
}

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

← All geoms · Getting started