Edward Tufte's Visual Display of Quantitative Information — two executable skills (tufte-critique, tufte-chart) backed by a VDQI-sourced principles reference. Critiques graphics against a nine-criterion VDQI rubric with named chartjunk species and a 13-entry catalogue of dissected failures, and renders per-genre charts (time-series, small multiples, quartile plot, range-frame scatter) plus a tufte-css HTML wrapper.

version
4.0.0
GitHub stars
313

Install

/plugin install tufte-vdqi@tufte-vdqi-marketplace

Run it inside Claude Code after adding the marketplace with /plugin marketplace add gnurio/tufte-vdqi-plugin.

Contents

Discovered from source

Skills 2

Tufte Chart

Render an actual chart file. "Design / build / produce a chart" requests land here; to fix a cluttered or misleading chart, run tufte-critique first and rebuild here honoring its remedy tags (B1–B7).

Build checklist (apply every time)

These bake in the principles from references/tufte-principles.md so the chart never needs cleanup afterwards. Read that file for the full reasoning.

  • Honest proportions (B1). Bars/columns start at a zero baseline. Encode a 1-D quantity with length or position, never with 2-D area or 3-D volume.
  • Range-frame axes (B2). Axis lines span exactly the data range, ends labelled; no outward padding. Exception: keep zero baseline for bar value axes.
  • Direct labels (B4). Label lines at their endpoints and bars beside the bars; do not emit a separate legend.
  • Minimal ink (B5). White background, no gridlines (or faint hairlines at major ticks only), no border box, no 3-D, no shadows, no gradients.
  • One encoding per datum (B6). Don't restate a value with fill + border + label; keep the strongest channel.
  • Many series → small multiples (B3). Repeat one shrunken design with shared scales rather than overplotting; order frames meaningfully.
  • Money over time (B7). If the series is currency across years, convert to real terms first (use scripts/deflate.py with retrieved CPI) and label the axis "real ".
  • Wider than tall. Unless the data dictates otherwise, "move toward horizontal graphics about 50 percent wider than tall" (VDQI p.190). The bundled scripts default to this; hold hand-built SVGs to it too.
  • Friendly type and color (Part H). Serif upper-and-lower-case type, words left-to-right, colors legible to color-deficient viewers — never red vs green for an essential contrast.
  • Inert SVG. No <script>, no event-handler attributes (onload= etc.), no javascript: URLs, no <foreignObject>, no SMIL <animate>/<set>. The four scripts below never emit these; if you hand-build SVG for one of the "other genres", keep it inert too — wrap_html.py refuses to wrap anything carrying active content.

Pick the genre first

Before writing any code, check references/tufte-principles.md Part C and choose Tufte's genre that fits the data shape. The toolkit ships a working script for the four genres below; for the rest, build the SVG by hand following Part C's recipe.

Data shapeTufte genre (Part C)Script
1 × N over timeC10 time-seriesrender_line_svg.py
K series indexed by a categoryC5 small multiplessmall_multiples.py
Distributions of K groupsC1 quartile plotquartile_plot.py
Bivariate / scatterC2 range frame (+ optional C3 dot-dash marginals)range_frame.py
Categorical 1-valueC9 white-grid bar / C6 supertablehand-build SVG
≤20 numbers totalC6 supertablehand-build HTML/SVG
Many variables, geographicF (Minard / Snow / Cancer Atlas)hand-build SVG

If the data is ≤20 numbers, prefer a table (VDQI p.56) — say so to the user before rendering. If forced to graph, use C6 supertable, not pie/bar.

Multi-render rule (when to produce N alternatives)

When the critique step flagged a "Multi-render trigger" (data shape with more than one correct Tufte answer), render both alternatives side-by-side in one output, then let the user pick. This is the discipline that prevents quiet defaulting to the obvious genre.

Data shapeRender BOTH
1 number / single ratio(a) a one-sentence prose statement with the number inline, and (b) a tiny inline visual — a one-row proportion bar or a small two-color dot square
≤20 numbers(a) a C6 supertable (with optional table-graphic sparkline column), and (b) a single Tufte chart (C8 + C2 range-frame dot plot, or C9 white-grid bar)
Many series of one x(a) a C5 small-multiples grid, and (b) an overplotted line/dot chart with direct end-labels
Distributions across groups(a) a C1 quartile plot, and (b) a strip plot or histogram
Bivariate scatter(a) a C2 range frame, and (b) the C3 dot-dash variant adding marginals

For all other data shapes, render one canonical Tufte form (don't manufacture alternatives when one obviously dominates). When emitting both alternatives, state in one sentence why each exists and what to look at in each — the goal is letting the reader see the toolkit's range, not flooding them with near-duplicates.

How to render

Line / time-series (C10)

python3 scripts/render_line_svg.py \
  --data '[{"x":2000,"y":12.1},{"x":2023,"y":22.9}]' \
  --title "Revenue (real 2023 USD, M)" --series "Revenue" --out chart.svg

(Pass --data-file path.json for larger data. For monetary series, deflate the values before passing them in.)

Small multiples (C5) — "inevitably comparative, deftly multivariate"

Input is a flat list of records keyed by facet, x, and y:

python3 scripts/small_multiples.py \
  --data '[{"facet":"NA","x":1,"y":1000},{"facet":"EU","x":1,"y":900}, ...]' \
  --facet-key facet --x-key x --y-key y \
  --title "Daily active users by region" --cols 3 --out chart.svg

Frames are sorted by total y (descending) unless --order "A,B,C" is passed. All frames share scales; axis end-labels appear only on the first frame to avoid repeating ink.

Quartile plot (C1) — Tufte's stripped-down box plot

Input is a JSON object mapping group name to list of values:

python3 scripts/quartile_plot.py \
  --data '{"Control":[2.3,2.5,...],"TreatmentA":[1.8,2.0,...]}' \
  --title "Reaction time (s) by condition" --out chart.svg

The box is erased; what remains is a single vertical stroke per group spanning the full range, the IQR offset horizontally from it, and a median tick.

Range-frame scatter (C2) — and optional dot-dash plot (C3)

python3 scripts/range_frame.py \
  --data '[{"x":1.2,"y":3.4},{"x":2.1,"y":4.5},...]' \
  --title "Body mass vs. wing span" \
  [--marginal-dash] --out chart.svg

--marginal-dash adds Tufte's dot-dash plot (VDQI p.133): marginal frequency dashes along each axis framing the bivariate distribution.

Other genres (bar, supertable, multivariate map, etc.)

Write the SVG/HTML directly, following Part C's recipe and the build checklist above. Keep it a single self-contained file. A minimal pattern: white canvas, thin dark data marks, range-frame axis lines with end labels, category/series text placed on the marks, no grid/box.

Optional: Tufte-styled HTML page

For a page that surrounds the chart with ET Book typography (and optional lede text or caption), wrap the SVG with scripts/wrap_html.py. It uses the bundled tufte-css (assets/tufte-css/, MIT-licensed) and copies the stylesheet and fonts into a sibling tufte-assets/ directory the first time so the result opens correctly in any browser with no network:

python3 scripts/wrap_html.py \
  --svg chart.svg --out chart.html \
  --title "Revenue, 2000–2023" \
  --caption "Inflation-adjusted to 2023 USD using BLS CPI-U."

Use the SVG output when you need a portable single file (charts in a paper, a slide deck, another site). Use the HTML wrapper when you want a self-contained, browser-ready Tufte page (sharing a link, hosting a report). Pass --no-assets if the page will be served from a site that already publishes tufte.css at the expected path.

wrap_html inspects every SVG before inlining. If it exits with ERROR[active-svg], the SVG carries script-bearing content (scripts, event handlers, animation, external references) — produce inert SVG instead (see the build checklist); the four bundled scripts always do.

Always save the file and tell the user its path. Where useful, follow up with tufte-critique to confirm the result scores well.

What good looks like

A file that renders in a browser, carries no chartjunk, labels data directly, uses honest proportions, and would itself pass a tufte-critique review.

Related skills

  • tufte-critique — diagnose a chart and get the remedies to apply here.

Tufte Critique

Critique an existing graphic: score it, name what's wrong using Tufte's vocabulary (the duck, the dreaded grid, moiré vibration, dimensionality violation, etc.), and hand back the exact remedy plus the genre to switch to and an exemplar to emulate.

The output is concrete and source-grounded because the model reasons over a single principles file (references/tufte-principles.md) that quotes VDQI by page. Generic "improve data-ink ratio" advice is the failure mode this skill is designed to avoid.

What you need from the user

A description (or image, or file) of the graphic, and ideally its purpose and audience. If something essential is missing, infer reasonably and state the assumption rather than stalling.

How to critique (six-step workflow)

Read references/tufte-principles.md first. The workflow uses every part of it.

  1. Score the nine criteria (Part A). 0–10 each, with a chart-specific observation. Use VDQI's numeric anchors: e.g. data-ink ratio "in several cases … increased from .1 or .2 to nearly 1.0" through editing (p.136); data density 0.15 numbers/in² is "overwrought" (p.162). Unsupported scores are the main failure mode.

  2. Compute the lie factor when proportionality looks suspicious (Part B, B1). Formula: (visual change %) / (data change %). Acceptable 0.95–1.05. Report the number and compare to VDQI's catalogue (Part E) — anchor the verdict in a named case: "this is essentially the 1979 TIME barrel (lie factor 59.4)" or "in the league of the LA Times shrinking-doctor (lie factor 2.8)" rather than a free-floating number.

  3. Identify chartjunk species present (Part D). Walk the four named offenses and name each one the chart exhibits, citing Tufte's named offender when the resemblance is close:

    • Moiré vibration (cross-hatching, dense stippling, gradients)
    • Dreaded grid (grid darker than the data marks)
    • Duck (decoration drives the chart; visual style > data; dimensionality exceeds data dimensionality)
    • Decoration (ornament that carries no information)
  4. Rank candidate genres and challenge the default (Part C, Part G). List at least three Tufte genres that could fit the data, ranked by fit. Then apply the default-challenge rule:

    If your top-ranked genre is also what an unprompted Claude would pick (line, bar, dot plot, scatter, pie), you MUST do one of: (a) explicitly justify it by citing what the alternatives lose, OR (b) reach for a second-line VDQI move (supertable, table-graphic, sparkline, dot-dash plot, quartile plot, small multiples) and explain why it is the stronger fit here.

    Quiet defaulting to the obvious chart is the failure mode this rule exists to catch.

    Common multi-answer data shapes (flag these in the output so tufte-chart knows to emit alternatives):

    • 1 number / single ratio → prose statement + tiny inline visual
    • ≤20 numbers → supertable + Tufte chart (VDQI p.56)
    • Many series of one x → small multiples + overplotted comparison
    • Distributions across groups → quartile plot + strip plot or histogram
    • Bivariate scatter → range frame + dot-dash marginal variant
  5. Compute the weighted overall score. Weights: integrity 3×, proportionality 2×, data-ink 2×, typography 0.5×, the rest 1×.

  6. Translate scores into ranked fixes. Each fix gets up to four tags:

    • Remedy: B1–B7 (the technique).
    • Genre: C1–C10 (the form to switch to). Optional.
    • Anti-pattern resemblance: name a Part-E case the graphic looks like. Optional.
    • Exemplar to emulate: name a Part-F graphic the redesign should resemble. Optional.

If the graphic plots a multi-year currency series, check B7. Use scripts/deflate.py (requires real CPI values; refuses to guess).

A sound graphic deserves a clean bill. "The principles should not be applied rigidly or in a peevish spirit" (VDQI p.191) — if the chart is honest and clear, score it high and say so; do not invent problems.

Output format

## Critique: <graphic>
Context: <purpose / audience, or stated assumption>

### Scores
<one line per criterion: name — score/10 — chart-specific observation>

### Chartjunk species present
<list any of: moiré, dreaded grid, duck, decoration — each with the detected signature, and Tufte's named offender it most resembles>

### Distortion check
Lie factor: <value or "n/a"> — <interpretation>
Resembles: <named VDQI case from Part E, or "no close analogue">

### Genres considered (ranked)
1. <Part-C genre> — <why it fits this data>
2. <Part-C genre> — <why>
3. <Part-C genre> — <why>

Chosen: <genre>. Default-challenge: <if the chosen genre is what unprompted Claude would also pick, justify here by citing what the alternatives lose; otherwise note "second-line VDQI move — stronger fit than the default chart">.

Multi-render trigger: <one of the data shapes from step 4, e.g. "≤20 numbers ⇒ supertable + chart" — or "none, single canonical render">

### Overall: <weighted score>/10 — <one-sentence verdict>

### Fixes (highest impact first)
1. [B?, C?, resembles E?, emulate F?] — <concrete change>
2. ...

What good looks like

All nine criteria scored with chart-specific evidence; chartjunk species named where present; distortion quantified and anchored in a VDQI case; the genre question explicitly considered; recommendations ordered by impact, each tied to a remedy AND (when applicable) a genre switch / a famous case to avoid / a famous case to emulate. The reader should leave with a concrete picture of what to build next, not a list of vague improvements.

Related skills

  • tufte-chart — rebuild the graphic so it satisfies these criteria, using the per-genre scripts named in your fixes. To fix a cluttered or misleading chart: critique here first, then rebuild there honoring the B-tags.

Sponsors

Details

Marketplace
gnurio/tufte-vdqi-plugin
Author
George Nurijanian
Category
Data Visualization
Keywords
data-visualization, tufte, graphics, design, data-ink-ratio, visual-display, lie-factor, chartjunk, small-multiples, graphical-excellence