Geoms

Functions

  • geom-blank - Invisible layer used to extend trained scales without drawing marks.

Areas and ribbons

  • geom-area - Area layer: filled polygon from y = 0 up to y along x, per group.
  • geom-ribbon - Filled band between ymin and ymax along the x aesthetic.
  • geom-smooth - Fitted trend line with an optional confidence ribbon.

Bars and histograms

  • geom-bar - Bar layer that counts rows per x level (stat-count).
  • geom-col - Bar layer with heights taken from the y aesthetic.
  • geom-freqpoly - Frequency polygon: a line through per-bin counts of the x aesthetic.
  • geom-histogram - Histogram layer: bars of binned counts along the x aesthetic.

Contours

  • geom-contour - Contour-line layer: marching-squares iso-lines over a regular (x, y, z) grid. Pair with a continuous colour scale on _level to shade by height.
  • geom-contour-filled - Filled iso-band layer: marching-squares cell clipping over a regular (x, y, z) grid. Pair with a continuous fill scale on _level to shade each band by its lower bound.

Distributions

  • geom-boxplot - Boxplot layer: draws a Tukey box, whiskers, and outlier points per group.
  • geom-dotplot - Dotplot layer: one dot per observation, stacked within bins.
  • geom-qq - Q-Q point layer: sorted sample versus theoretical quantile.
  • geom-qq-line - Q-Q reference line layer fitted through the IQR of the sample.
  • geom-quantile - Quantile-regression layer: a fitted line per requested τ.
  • geom-rug - Marginal rug ticks at each row’s x and / or y position.

Intervals and errors

  • geom-crossbar - Crossbar layer: a box from ymin to ymax with a horizontal bar at y.
  • geom-errorbar - Errorbar layer: vertical range with a horizontal cap at each end.
  • geom-errorbarh - Horizontal errorbar layer: range with a vertical cap at each end.
  • geom-linerange - Linerange layer: one vertical line from ymin to ymax at each x.
  • geom-pointrange - Pointrange layer: a marker at (x, y) plus a linerange from ymin to ymax.

Lines and paths

  • geom-curve - Curved segment layer: one quadratic bezier from (x, y) to (xend, yend) per row.
  • geom-function - Polyline of fun(x) sampled uniformly across the x-range.
  • geom-line - Line layer connecting observations in x order, one path per group.
  • geom-path - Path layer connecting observations in row order, one path per group.
  • geom-segment - Segment layer: one line from (x, y) to (xend, yend) per row.
  • geom-spoke - Spoke layer: one segment from (x, y) along (angle, radius) per row.
  • geom-step - Step layer connecting observations as a stair-step path, one per group.

Points

Polygons and shapes

  • geom-ellipse - Ellipse layer: draws one closed ellipse per row from (x0, y0, a, b, angle).
  • geom-mark - Annotation layer enclosing each group with a chosen shape.
  • geom-polygon - Polygon layer: one closed filled polygon per group.

Rectangles and bins

  • geom-bin-2d - Two-dimensional bin layer: counts (x, y) into a rectangular grid and draws one rectangle per non-empty cell. The fill aesthetic defaults to _count, so a continuous fill scale (scale-fill-viridis-c, etc.) shades the cells by frequency.
  • geom-hex - Hex bin layer: counts (x, y) into a pointy-top hex grid and draws one hexagon per non-empty cell. Default fill encodes count via the fill scale.
  • geom-rect - Rectangle layer drawing one filled box per row from the four corners.
  • geom-tile - Tile layer: filled rectangle centred at (x, y) per row.

Reference lines

  • geom-abline - Straight reference line described by slope and intercept.
  • geom-hline - Horizontal reference line at one or more y intercepts.
  • geom-vline - Vertical reference line at one or more x intercepts.

Text and annotations

  • annotate - Build a one-row annotation layer dispatching to a named geom.
  • geom-label - Boxed text label layer reading strings from the label aesthetic.
  • geom-text - Text label layer reading strings from the label aesthetic.
  • geom-typst - Text label layer whose label aesthetic is always evaluated as Typst markup.
Back to top