Static documentation

Data Visualisation Catalogue Gallery

Rendered markdown notes for the catalogue review, compiler mapping, implementation tracker, and chart method specs.

38 chart methods
10 with reference assets
43 documents

Violin Plot

Source: Data Visualisation Catalogue - Violin Plot

Why This Belongs In The Compiler Gallery

Violin plots extend the density plot from one distribution to grouped distributions. They are useful in the compiler gallery because the visible shape is not a primitive mark: the compiler must estimate group density, mirror it around each category center, and emit a path silhouette while preserving lineage back to raw observations.

Data Contract

Each raw row represents one observation in one group.

FieldTypePurpose
categorycategoricalGroup/facet for one violin silhouette.
scorequantitativeRaw observed measure.
pathDtext, derivedMirrored density silhouette emitted by the violin layout.
medianquantitative, derivedMedian for the category.
q1 / q3quantitative, derivedInterquartile guide values.
bandwidthquantitative, derivedKernel bandwidth used for the density estimate.

Expected Visual

A faithful violin plot should show one mirrored density shape per category. The widest part of each silhouette represents the densest value range. Median and interquartile guides help keep the chart readable as a statistical summary, not only a shape comparison.

ElementExpected treatment
SilhouetteSmooth mirrored density path centered under the category label.
Summary guideMedian crossbar and IQR line.
AxisShared quantitative y-axis.
ColorOrdinal color by category.
LabelsCategory labels below the silhouettes.

Compiler Mapping

Compiler partMapping
Data sourceobservations and derived violins.
TransformFocused layoutKind: "violin" estimates density, mirrors it, and emits pathD, median, and quartile coordinates.
Scalesy: linear, color: ordinal.
LayersDirect path silhouettes plus line median/IQR guides and text category labels.
GuidesGenerated y-axis and y gridlines.

Faithfulness Notes

The core mirrored density shape is compiler-owned now. Remaining work is policy breadth: grouped bandwidth controls, optional raw-point overlays, density normalization modes, and collision-aware labels for many categories.