beautiful-data-viz
Skill9 starsChanged 4 months agoMITView on GitHub
Shared design rules for every plot, figure, chart, dashboard or data visual (matplotlib, seaborn, ggplot2, Plotly, HTML/SVG). Greyscale first, color only to encode information, colorblind-safe, publication-ready export. Use when making, restyling or reviewing any chart or figure.
In this repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- ai-scientist-evaluatorSkill
- arxiv-searchSkill
- bio-annotationSkill
- bio-assembly-qcSkill
- bio-binning-qcSkill
- bio-fasta-database-curatorSkill
- bio-foundation-housekeepingSkill
- bio-gene-callingSkill
- bioinformatics-projectSkill
- bio-interdomain-hgtSkill
- bio-logicSkill
- bio-phylogenomicsSkill
- bio-prefect-dask-nextflowSkill
- bio-protein-clustering-pangenomeSkill
- bio-reads-qc-mappingSkill
- biorxiv-searchSkill
- bio-stats-ml-reportingSkill
- bio-structure-annotationSkill
- bio-viromicsSkill
- bio-workflow-methods-docwriterSkill
- crossref-lookupSkill
- csag-extractionSkill
- exploratory-data-analysisSkill
- manuscript-review-councilSkill
- notebooksSkill
- pdf-to-mdSkill
- plotly-dashboard-skillSkill
- polars-dovmedSkill
- proposal-reviewSkill
- public-db-lookupSkill
- scientific-impact-assessmentSkill
- scientific-writingSkill
- tracking-taxonomy-updatesSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Use colorblind-safe colors, never make color the only encoding (add position, shape, line style, or a direct label), and keep the figure …
- Distinctive: line 21
Remove chart junk: no 3D, no pie charts unless asked for, no decorative borders, no heavy grids, no gradient fills, no dual y-axes.
- Very specific: line 29
Check the result at the target size: run the references/checklist.md pass, and view a greyscale copy to confirm every encoding survives …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Beautiful Data Viz
The pack's shared rules for any data visual, whatever the library or medium. Show the data, remove decoration, label directly, and add only the context the reader needs. Other skills that draw figures (/plotly-dashboard-skill, /notebooks, the bio-* reporting skills) follow these rules and add only what their medium needs.
Instructions
Greyscale first. Draw every mark in neutral greys by default. Add color only when it encodes information:
- a category the reader must tell apart,
- the one highlighted finding (one accent color; everything else stays grey),
- an ordered or signed quantity (sequential or diverging scale).
Use colorblind-safe colors, never make color the only encoding (add position, shape, line style, or a direct label), and keep the figure readable in greyscale print. When color is warranted, pick it from references/palettes.md.
- Clarify the message, comparison context, audience, and medium (notebook, paper, slides, web). One or two values read better as a sentence; a short lookup list reads better as a table.
- Choose the simplest chart that answers the question: horizontal bars or dot plots for ranked categories, small multiples instead of more than four overlaid series or a dual axis, slopegraphs for before/after, sparklines for compact trends.
- Remove chart junk: no 3D, no pie charts unless asked for, no decorative borders, no heavy grids, no gradient fills, no dual y-axes.
- Label series directly. Keep a legend only when direct labels would collide with the data or each other.
- Manuscript figures carry no in-plot title or subtitle; axis labels, direct labels, panel letters, and the caption do that work. The caption sits below the figure: in a notebook the figure cell comes first and the caption cell follows it.
- Apply the style for the medium:
- matplotlib or seaborn:
set_beautiful_style(...)from assets/beautiful_style.py. It sets a grey series cycle with distinct line styles and returns a config whoseaccentis a colorblind-safe highlight color for the current background. - R / ggplot2:
theme_classic()ortheme_minimal(),scale_colour_grey()for neutral series, andscale_colour_manual()to give only the finding the accent. - Plotly or Dash: a registered template with a grey
colorwayand the accent added per trace; see/plotly-dashboard-skillreferences/style.md. - HTML / SVG: define neutral greys and one accent as CSS custom properties and redefine them for dark mode.
- matplotlib or seaborn:
- Check the result at the target size: run the references/checklist.md pass, and view a greyscale copy to confirm every encoding survives (
Image.open(path).convert("L")with Pillow). - Reproduce figures from a pinned environment: the project's
pixi.toml(this skill ships one in pixi.toml), or a PEP 723 script run withuv run --script, as in scripts/export_fixture.py.
Quick Reference
| Task | Action |
| Apply matplotlib style | cfg = set_beautiful_style(medium="paper") from assets/beautiful_style.py |
| Highlight the finding | ax.plot(x, y, color=cfg.accent); all other series keep the grey cycle |
| Direct label, range frame, sparkline | direct_label, annotate_point, apply_range_frame, sparkline |
| Choose colors when warranted | references/palettes.md |
| Final QA pass | references/checklist.md |
| Copyable plot patterns | examples/recipes.md |
| Duplicate figures in an executed Jupyter notebook | See the /notebooks troubleshooting section |
Input Requirements
- Data in tabular form (pandas or polars DataFrame, R data frame, or similar).
- The primary message the figure must carry.
- Target medium, size, and background.
Output
- Figures exported as PNG, SVG, or PDF (or an HTML/SVG visual) with consistent styling and labeling.
- The plotting code that reproduces them from a pinned environment.
Quality Gates
- The message is clear within a few seconds at the target size, and a sentence or table would not do better.
- Marks are grey unless color encodes a category, the one finding, or an ordered or signed quantity.
- Colors are colorblind-safe, color is never the only encoding, and the greyscale copy stays readable.
- Manuscript figures have no in-plot title; the caption sits below the figure.
- No top/right spines, decorative borders, 3D, or heavy grid; direct labels replace legends where they fit.
- Labels carry units, and comparison context is present when the claim depends on it.
uv run --script skills/beautiful-data-viz/scripts/export_fixture.py skills/beautiful-data-viz/fixtures/growth_curve.csv --out build/fixturewrites non-empty PNG, SVG, and PDF files with grey default series; with--background dark, labels inherit the dark-theme text color.
Examples
Example 1: Grey series with one highlighted finding
from pathlib import Path
import sys
import matplotlib.pyplot as plt
SKILL_DIR = Path.home() / ".agents" / "skills" / "beautiful-data-viz"
sys.path.insert(0, str(SKILL_DIR))
from assets.beautiful_style import direct_label, finalize_axes, set_beautiful_style
cfg = set_beautiful_style(medium="paper", background="light")
fig, ax = plt.subplots(figsize=(4.2, 2.8))
for name, y in reference_series.items(): # context: default grey cycle
ax.plot(x, y, linewidth=1)
direct_label(ax, x, y, name)
ax.plot(x, treated, color=cfg.accent, linewidth=2) # the finding
direct_label(ax, x, treated, "Treated", color=cfg.accent)
finalize_axes(ax, xlabel="Time (days)", ylabel="Biomass (g/L)")
fig.savefig("growth.pdf")Troubleshooting
Issue: Labels overlap or are unreadable. Solution: Reduce tick count, wrap or abbreviate labels, switch to horizontal bars, or widen the figure.
Issue: Categories are hard to tell apart. Solution: Reduce the number of colored categories (group the rest in grey as "Other"), add markers or line styles, or split into small multiples.
Issue: A chart needs a legend, many colors, and a second y-axis to fit. Solution: Split it into small multiples with shared scales and direct labels.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

