GeomBoxplot

Box-and-whisker geometry: one box per x category (per group) summarizing the y distribution — hinges at the quartiles, whiskers to the furthest points within coef × IQR, outliers drawn individually.

Defaults

geom
boxplot
default stat
boxplot
default position
dodge
params type
BoxplotParams

Svelte component

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

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

JSON layer

{
  "geom": "boxplot",
  "stat": "boxplot"
}

Params

width

number

Box width as a fraction of the band step. Must be greater than 0 and at most 1. Default 0.75. When omitted, width is also capped at 15% of the panel so few categories do not read as slabs.

coef

number

Whisker length as a multiple of the IQR (values beyond it are outliers). Must be at least 0. Default 1.5.

linewidth

number

Stroke width of the box, whiskers, and median line in px (the median draws at twice this). Must be greater than 0. Default 1.

outlierSize

number

Outlier point radius in px. Must be greater than 0. Default 1.5.

alpha

number

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

Allowed stats

Allowed positions

Examples

← All geoms · Getting started