// SLIDE 01 — HOOK

VIOLIN PLOT

When Box Plots Hide Bimodality — Add Density to See Shape

Violin Plot — Figure 77.1 — When Box Plots Hide Bimodality
NARRATION

When Box Plots Hide Bimodality , Add Density to See Shape Figure 77.1 , When Box Plots Hide Bimodality

// SLIDE 02 — WHAT THIS CHART IS

WHAT THIS CHART IS.

A violin plot combines a box plot with a kernel density estimate (KDE). Each "violin" is a vertical (or horizontal) shap

What this chart is — The chart was introduced by Jerry Hintze and Ray Nelson in 1998 as a replacement for the box plot in cases where the box
NARRATION

A violin plot combines a box plot with a kernel density estimate (KDE). Each "violin" is a vertical (or horizontal) shape whose width at any point along the value axis encodes the estimated probability density of observations at that value. The shape is symmetric , the KDE is mirrored around a central spine , so the silhouette reads like a violin or a leaf.

// SLIDE 03 — WHAT THE VIOLIN REVEALS THAT T

WHAT THE VIOLIN REVEALS THAT THE BOX PLOT HIDES.

Bimodality is the strongest case. Two distributions — one with a single peak around the median, one with two peaks far f

What the violin reveals that the box plo — Skew that the box plot summarises as "median offset within the box" becomes a literal shape in the violin: a left-skewed
NARRATION

Bimodality is the strongest case. Two distributions , one with a single peak around the median, one with two peaks far from the median , can produce identical box plots. The five-number summary is identical. The reader sees no difference. The violin plot pulls them apart immediately: the unimodal distribution is a single bulge; the bimodal distribution is a figure-eight or a peanut shape. This is information that genuinely matters: a bimodal salary distribution within a single job title means there is structure (junior vs.

// SLIDE 04 — HOW TO READ THIS CHART

HOW TO READ THIS CHART.

Read the silhouette shape. The width at any height encodes density at that value: where the violin is widest, observatio

How to read this chart — Compare violins by reading their shapes side by side. Two violins of equal vertical extent but different widths represen
NARRATION

Read the silhouette shape. The width at any height encodes density at that value: where the violin is widest, observations cluster; where it pinches, observations are scarce. The full vertical extent shows the data range. The overlaid box plot, drawn down the spine, gives Q1, median, Q3, and outlier points exactly as a standalone box plot would. Compare violins by reading their shapes side by side. Two violins of equal vertical extent but different widths represent distributions with the same range but different concentrations.

// SLIDE 05 — THE BANDWIDTH PROBLEM

THE BANDWIDTH PROBLEM.

The KDE that draws the violin's shape depends on a bandwidth parameter — a smoothing window that determines how rough or

The bandwidth problem — Sensible defaults exist. Silverman's rule (1.06 × σ × n^(-1/5)) and Scott's rule are both commonly used; D3's d3-array.b
NARRATION

The KDE that draws the violin's shape depends on a bandwidth parameter , a smoothing window that determines how rough or how smooth the resulting curve is. Too narrow a bandwidth and the violin becomes a noisy series of bumps that overfit the sample; too wide a bandwidth and genuine multimodality smooths into a single bulge. The chart looks definitive but is parameter-dependent in a way the box plot is not. Sensible defaults exist.

// SLIDE 06 — WHAT THE ALTERNATIVE WOULD BRE

WHAT THE ALTERNATIVE WOULD BREAK.

A box plot alone — the most common alternative — hides multimodality, hides shoulders, and erases sharp cliffs in the ta

What the alternative would break — A histogram for each group — the alternative that most directly shows shape — works for one or two groups but does not s
NARRATION

A box plot alone , the most common alternative , hides multimodality, hides shoulders, and erases sharp cliffs in the tail. For sample sizes large enough to support a violin (n ≳ 50), the box plot's compactness comes at the cost of information the reader needs to know.

// SLIDE 07 — FRAMEWORK REFERENCE

FRAMEWORK REFERENCE

FRAMEWORK FT Visual Vocabulary: Distribution — "Show the range of values in a dataset and how they are distributed." Abe

NARRATION

FRAMEWORK FT Visual Vocabulary: Distribution , "Show the range of values in a dataset and how they are distributed." Abela quadrant: Distribution (single variable, multiple groups, comparison of shape). Tufte principle: the violin's shape encodes density, the box plot's overlay encodes quartiles , every pixel does work, but the chart relies on KDE bandwidth as a parameter the reader cannot see in the chart itself. The one design decision worth knowing: bandwidth choice.

// SLIDE 08 — PROMPT

PROMPT

violin-plot.htmla full HTML page with inline CSS and inline D3 v7 (loaded from The chart should fill the viewport, be responsive on resi
violin-plot/data.jsonthe data file the chart loads via d3.json("./violin-plot/data.json"), with a fallback inline literal in the HTML if the
3–6 groups of continuous measurements, n=80–200 each, with at least one group exhibiting bimodality so the violin shape salaries by job family, response times by region, test scores by class section.
groupstring — category label (band axis)
valuesnumber — raw measurements; KDE computed at render time
NARRATION

Paste this into Claude Code to generate a working version of this chart, plus its data file. The result will not be a perfect replica , the goal is that the reader can run the prompt, get a chart of this type, and read its source. Generate a complete, self-contained violin plot in D3 v7. Two files:

// SLIDE 09 — AI WAYBACK MACHINE

AI WAYBACK MACHINE.

George E. P. BoxRun this:"George E. P. Box"Now make the prompt better.
NARRATION

The ideas in this chapter didn't appear from nowhere. George E. P. Box built much of modern applied statistics , including the Box-Jenkins time-series methods and the Box-Cox transformation , and famously said "all models are wrong, but some are useful." His framework taught generations how to handle distributions with shapes a box plot couldn't capture, which is exactly what the violin plot solves. George E. P. Box, circa 1980. AI-generated portrait based on a public domain photograph (Wikimedia Commons).

// SLIDE 10 — THESIS

THE CORE CLAIM.

The ideas in this chapter didn't appear from nowhere. George E. P. Box built much of modern applied statistics — includi

George E. P. Box, circa 1980. AI-generated portrait based on a public domain photograph (Wikimedia Commons).

NARRATION

The ideas in this chapter didn't appear from nowhere. George E. P. Box built much of modern applied statistics , including the Box-Jenkins time-series methods and the Box-Cox transformation , and famously said "all models are wrong, but some are useful." His framework taught generations how to handle distributions with shapes a box plot couldn't capture, which is exactly what the violin plot solves. George E. P. Box, circa 1980. AI-generated portrait based on a public domain photograph (Wikimedia Commons).

// SLIDE 11 — CLOSE

ASK THE QUESTION. APPLY THE FRAMEWORK.

WHAT THIS CHART IS//WHAT THE VIOLIN REVEALS T//HOW TO READ THIS CHART

Brutalist D3 × Claude · Ch.77 · Violin Plot

NARRATION

That is the framework. Brutalist D3 times Claude, chapter 77: Violin Plot. The patterns are now in place. Apply them.

01 / 11
Brutalist D3 × Claude · Ch.77 · Nik Bear Brown