GeomCrossbar

Crossbar geometry: a vertical interval box from ymin to ymax with a mid horizontal line at y.

Defaults

geom
crossbar
default stat
identity
default position
identity
params type
CrossbarParams

Svelte component

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

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

JSON layer

{
  "geom": "crossbar"
}

Params

width

number

Box width: band-step fraction (band x) or fraction of continuous resolution (same rule as errorbar caps). Default 0.9.

fatten

number

Multiplier for the mid-line linewidth relative to params.linewidth / aes.linewidth. Default 2.5.

linewidth

number

Outline and base mid-line stroke width in px. Default 1.

alpha

number

Box and mid-line opacity. Default 1.

fun

"mean" | "median" | "sum"

STAT SUMMARY ONLY: center summary. Default "mean".

funMin

SummaryFun

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

funMax

SummaryFun

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

Allowed stats

Allowed positions

← All geoms · Getting started