GeomViolin
Violin geometry: mirrored kernel density of continuous y at each discrete x (stat ydensity). One polygon per x×group. Default position dodge.
Defaults
- geom
violin- default stat
ydensity- default position
dodge- params type
ViolinParams
Svelte component
import { GGPlot, GeomViolin } from "@ggsvelte/svelte";
<GGPlot data={rows} aes={{ x: "x", y: "y" }}>
<GeomViolin />
</GGPlot> JSON layer
{
"geom": "violin",
"stat": "ydensity"
} Params
bwnumberKernel bandwidth in data units (must be greater than 0). Omit for R's bw.nrd0 rule-of-thumb default.
adjustnumberBandwidth multiplier (must be greater than 0). Default 1.
nnumberNumber of density grid points (2–4096). Default 512.
trimbooleanWhen true (default), trim the density to the data range; when false, extend cut·bw tails like density().
scale"area" | "count" | "width"Relative violin max-width scaling: "area" (default), "count", or "width" (equal max width).
widthnumberMax violin width as a fraction of the discrete x band (like boxplot). Default 0.75.
alphanumberFill opacity. Must be between 0 and 1 (inclusive). Default 1.
linewidthnumberOutline stroke width in px. Must be greater than 0. Default 0.5.
fillPaintGradientPaintWithin-mark gradient fill paint (not a data scale). Requires a solid fallback.
strokePaintGradientPaintWithin-mark gradient stroke paint (not a data scale). Requires a solid fallback.
glowGlowSpecBounded within-mark glow treatment (not theme decoration).
Allowed stats
ydensitydefault