On this page
Stats
28 stats
All stats
identityPass rows through unchanged. Default for most geoms: each mapped row becomes one mark with no aggregation.uniqueKeep one row per distinct mapped (x, y) pair (and group). Use when duplicate coordinates would overplot; default for none.manualAuthor-supplied after_stat values via params — skip automatic transforms when you already computed summaries.connectExpand successive points into connection vertices (linear, hv, vh, mid) for stepped or path-style joins between observations.countCount rows (or sum weights) per distinct x within each group. Default for geom_bar; publishes after_stat count.binBin continuous x into histogram breaks. Publishes count, density, ncount, and ndensity; default for histogram and freqpoly.bin_hexHexagonal 2D binning over continuous x and y. Publishes count/density columns for geom_hex heatmaps.bin_2dRectangular 2D binning over continuous x and y. Publishes count/density and bin edges for geom_bin_2d tiles.smoothFit a smoother (lm or loess) and evaluate along x. Publishes y, ymin, ymax, and se; default for geom_smooth.quantileEstimate conditional quantiles of y given x. Publishes y at each requested probability; default for geom_quantile.boxplotFive-number summary per group (hinges and whiskers). Publishes ymin, lower, middle, upper, ymax; default for geom_boxplot.density1D Gaussian kernel density estimate along x. Publishes density, count, scaled, and ndensity; default for geom_density.summaryCollapse each discrete-x group to one summary (default mean ± se). Publishes y, ymin, ymax for error-style geoms.sumCount overlapping points at each (x, y) cell for geom_count. Publishes n and prop (not y).ydensityKernel density along y for violin shapes. Publishes density, count, scaled, violinwidth, and y; default for geom_violin.functionEvaluate a pure function on an x grid. Publishes y; default for geom_function when no data rows drive the mark.ecdfEmpirical cumulative distribution F̂(x). Publishes ecdf; pair with step or path geoms for CDF plots.summary_binBin continuous x, then summarize y in each bin (mean ± se by default). Publishes y, ymin, ymax for binned summaries.contourMarching-squares isolines over a regular x×y×z grid. Publishes level; default for geom_contour.alignInterpolate series onto a shared x grid so continuous-x stacks and overlays line up (stack-friendly zeros outside range).density_2dBivariate KDE with isolines. Publishes level and density; default for geom_density_2d.density_2d_filledBivariate KDE with closed density rings for filled contours. Publishes level and density; default for geom_density_2d_filled.bindotHistodot binning for geom_dotplot: one stack position per observation. Publishes stackpos (and bin occupancy).ellipseConfidence ellipse over bivariate points (level and type from params). Passes geometry suited to path/polygon-style marks.sfSimple-features geometry expansion for geom_sf: multiparts and holes become drawable rings without after_stat columns.sf_coordinatesLabel anchors from SF geometries for geom_sf_text and geom_sf_label (one point per feature or part).qqSample vs theoretical quantiles for Q–Q plots. Publishes sample and theoretical; default for geom_qq.qq_lineReference line through Q–Q sample/theoretical quantiles. Publishes sample and theoretical; default for geom_qq_line.
How to set a stat
On any geom shell, pass the stat prop. Only values listed on
that geom's Geoms page validate. Omit it to use the
geom default.
import { GGPlot, GeomBar } from "@ggsvelte/svelte";
<GGPlot data={rows} aes={{ x: "category" }}>
<GeomBar stat="count" />
</GGPlot>