The grammar of graphics with an agentic AI assistant — a live demonstration
Jon Minton
VisHub group meeting, EFI room 1.70
Tue 29 Sep 2026
The claim
The grammar of graphics is a design specification language, not an R package
Agentic AI can take over the language-specific implementation
That leaves the analyst’s attention on the design decisions: mappings, geoms, scales, facets, coords
Today: test that claim live, on a TidyTuesday dataset you choose
And then: tell me where it breaks.
The grammar travels
Implementation
Language
A grammar?
ggplot2
R
Yes — Wickham’s layered grammar
plotnine
Python
Yes — near line-for-line port
Vega-Lite
JSON / JS
Yes — mark / encoding / layer
plotly
JS / Python / R
Layered, but not a true grammar
The spec is substrate-invariant: the same mapping rules compile to any row marked “Yes”.
Chatbot vs agent
Chatbot
Sees only what you paste in
Writes text for you to copy
Forgets between sessions
Agent (LLM in a code scaffold)
Sits in the project folder
Reads, writes and runs files: R, shell, git
Renders the figure — and looks at it
Follows written project instructions
Access — the supported route
Frontier models in code scaffolds: e.g. Claude Code or Codex — interchangeable here; the repo works with either, or both
At the University: ELM, the University’s own AI gateway, is the institutionally supported route
Nothing today depends on a particular vendor — the instructions and skills are plain text
One instruction file, plain-text skills
agentic-datavis-workshops/
├── AGENTS.md ← single source of truth for any agent
├── CLAUDE.md ← one line: @AGENTS.md
├── .claude/skills/
│ ├── tt-fetch/ ← fetch + describe a TidyTuesday week
│ └── gg-spec/ ← YAML spec → ggplot2 → render → look
└── .agents/skills/ ← symlinks, so Codex sees the same skills
A skill is a markdown procedure — readable by you, followed by the agent
Skills exist for consistent behaviour across sessions and across vendors