Recipe Index
Named, copy-paste recipes for the charts people ask for by name. Each links to a complete, compiled example — the image you see is the output of the code right below it — and to the primitives it is built from.
The convenience marks (
mark_violin,mark_density,mark_contour,mark_density_2d, …) are just names for common compositions, so every entry's "Built from" column shows both the mark and the primitives it expands into. If your chart is missing, build it from the Marks & Geometries vocabulary and the layer pipeline, then add it here.
Distributions
| Recipe | Also known as | Built from |
|---|---|---|
| Density plot | KDE | mark_density (transform_density + mark_area) |
| Density heatmap | 2-D KDE | mark_density_2d (transform_density_2d + mark_rect) |
| Density contour | 2-D KDE iso-lines | mark_contour over transform_density_2d |
| Cumulative density | KDE integral | mark_density (cumulative) |
| Empirical CDF | cumulative frequency | transform_window (CumeDist) |
| Violin | density outline, upright | mark_violin |
| Grouped violin | dodged violin | mark_violin (x + color, dodge) |
| Faceted violin | small multiples | mark_violin + facet |
| Split violin | mark_violin (split) | |
| Raincloud | mark_violin + transform_quantile_box + jittered points | |
| Ridgeline | joyplot | transform_density + transform_band (split) + mark_polygon |
| Violin with inner box | mark_violin + transform_quantile_box | |
| Box plot | box & whiskers | mark_boxplot |
| Histogram | mark_hist | |
| Scatter | mark_point + shape/size/color | |
| Beeswarm | swarm | mark_point + layout |
| Quasirandom | dot plot | mark_point + layout |
| Strip plot | rug | mark_tick |
| Styled strip | mark_tick + configure_tick |
Comparisons
| Recipe | Also known as | Built from |
|---|---|---|
| Bar with error bars | mean ± error | mark_bar + mark_errorbar |
| Grouped bar with error bars | mark_bar + mark_errorbar + Position::dodge | |
| Stacked bar | mark_bar + stack | |
| Error bar | mark_errorbar | |
| Dumbbell | connected dot | mark_rule + mark_point |
| Lollipop | mark_rule + mark_point | |
| Range plot | intervals | mark_rule (y + y2) |
| Waterfall | running total | mark_bar (y2) + transform_window (CumulativeSum) |
| Candlestick | OHLC | mark_rule + mark_bar (y2) |
Trends & time
| Recipe | Also known as | Built from |
|---|---|---|
| Line (multiple series) | mark_line + color | |
| Cumulative frequency | mark_line | |
| Multi-series with error bars | mark_line + mark_errorbar + mark_point | |
| Formatted axis labels | $20B-style | with_y_label_format |
| Slope chart | mark_line + mark_point | |
| Bump chart | ranking | transform_window (Rank) + reversed axis |
| Area chart | mark_area | |
| Simple stacked area | mark_area + stack: stacked | |
| Normalized stacked area | 100% area | mark_area + stack: normalize |
| Steamgraph | streamgraph | mark_area + stack: center |
Matrices & relationships
| Recipe | Also known as | Built from |
|---|---|---|
| Scatter | mark_point + shape/size/color | |
| Categorical heatmap | mark_rect | |
| Continuous heatmap | 2-D histogram | mark_rect + binning |
| Iso-lines of a grid | contour plot | mark_contour (transform_contour + mark_path) |
| Single-colour contour | mark_contour without colour-by-level | |
| Density contours | 2-D KDE | mark_contour over transform_density_2d |
Circular
| Recipe | Also known as | Built from |
|---|---|---|
| Pie | mark_bar + CoordSystem::Polar | |
| Donut | pie + inner radius | |
| Rose | polar bar | mark_bar + polar |
| Nightingale | coxcomb | mark_bar + polar |
Layout & special
| Recipe | Also known as | Built from |
|---|---|---|
| Facet grid | small multiples | facet |
| World map | choropleth | mark_geoshape + CoordSystem::Geo |
Choosing a distribution view
- Histogram — a first, honest look at the shape.
- Density — the same shape, smoothed; good when the distribution is interesting.
- Box plot — compact and precise about quartiles, hides the shape.
- Violin — the shape with quartiles available as an inner box.
- Ridgeline — many distributions compared at once, one density per category.
- Beeswarm / strip — every observation; good for small samples.
See Missing Values & Gaps for how each view handles nulls and gaps.
Going deeper
- Composing Your Own — recombining the primitives into new pictures the marks do not cover.
- Contour Plots — the marching-squares machinery and the general scalar-grid contour.
- Transforms & Columns — the column contract of every transform used by these recipes.