data-chart
Installation
SKILL.md
Data Chart
Render measured data as static charts in the shared editorial figure language: gridless ink axes, restrained direct labels, and one accent family per page. Titles and legends are optional content, not a fixed page frame. SVG is the primary artifact (text preserved as text); inspect a PNG proof before claiming success.
Routing: chart or diagram?
Decide by the figure's content, not its name:
- Measured data - real numbers, many points, true scales (log axes, distributions, time series) - this skill.
- Structure - boxes, arrows, layers, pipelines, or a few illustrative values inside a larger schematic - the sibling
technical-diagramskill. Usedrawio-diagramonly when native draw.io format is part of the request. - Borderline (3-8 bars): real measurements that may change → this skill (the chart regenerates from data); a decorative sketch inside a diagram → technical-diagram.
Quick start
- Read
references/chart-language.mdfor the full rule set (anatomy, tokens, marks, dark mode). - Write a small script that imports the style module
scripts/editorial_mpl.py:ed.use()→ plot with family colors →ed.mono_ticks/ed.axis_label→ optionaled.header→ed.save(fig, stem)(writesstem.svg+stem.png). The module reads the vendored canonical values fromassets/editorial-tokens.json.scripts/example_chart.pyis a working reference for both a line chart and grouped bars; copy its margin setup (subplots_adjustwithtop≈0.80clears the header row). - Run it. No system matplotlib is assumed - use
uv run --with matplotlib python <script>.py(add other deps the same way).findfontwarnings about Inter/IBM Plex Mono are expected on machines without those fonts; fallbacks carry the voice and the SVG keeps the full stack. - Look at the PNG before finishing. Check: no clipped direct labels or tick text (widen margins, not the font), any required legend fits on one line, one accent family, and no gridlines or unrequested supporting text.