Generate charts from natural language via @plotters in Copilot Chat.
Powered by the Rust plotters crate with a matplotlib pyplot-like API.
@plotters Chat Participant
Type @plotters in Copilot Chat followed by a natural language description:
@plotters a histogram of 500 normally-distributed values with 30 bins
@plotters /pie revenue split: Web 40%, Mobile 30%, Desktop 20%, Other 10%
@plotters /line monthly sales for 2024 with three product lines
Slash commands: /histogram, /pie, /line, /scatter, /area, /boxplot,
/candlestick, /axes, /subplots.
How it works
- Your prompt is sent to the Copilot LLM with the plotters-skill API reference
- The LLM generates a TypeScript script
- The script is type-checked against the
.d.ts— errors are fed back for auto-fix (up to 3 retries) - The passing script runs in a sandboxed VM — no filesystem or network access
- The rendered chart image is sent back to the LLM for verification
- The PNG is displayed inline in chat
Features
| Feature | Description |
|---|---|
| Chart History | Gallery sidebar in Explorer — browse, re-render, or delete past charts |
| Edit Script | One-click button opens the generated TypeScript with a "▶ Render Chart" CodeLens |
| LLM Verification | Charts are verified against the original request; mismatches trigger automatic retry |
| Inline Errors | Type-check and runtime errors shown in chat during retries |
| Feedback Tracking | 👍/👎 on chat responses tracked for stats (PlottersSkill: Show Feedback Stats) |
| Notebook Support | *.plotters-notebook files — TypeScript cells execute with inline PNG output |
| Render from Editor | PlottersSkill: Render Chart from Active Editor — run any .ts script directly |
| Configurable | Settings for retry count, VM timeout, preferred model, and source visibility |
Chart Types
| Chart | figure() |
axes() |
|---|---|---|
| Histogram | ✅ | — |
| Pie / Donut | ✅ | — |
| Box Plot | ✅ | — |
| Area (fillBetween) | ✅ | ✅ |
| Candlestick (OHLC) | ✅ | — |
| Line | ✅ | ✅ |
| Scatter | — | ✅ |
| Bar | — | ✅ |
| Step | — | ✅ |
AI Skill Installation
The bundled SKILL.md can be installed into any project so Copilot, Claude, or
other AI tools automatically discover the plotters-skill API:
npx plotters-skill install-skill # all tools
npx plotters-skill install-skill --target copilot # .github/skills/plotters-skill/
npx plotters-skill install-skill --target claude # .claude/skills/plotters-skill/
Settings
| Setting | Default | Description |
|---|---|---|
plotters-skill.maxRetries |
3 | Type-check / verification retry limit |
plotters-skill.vmTimeout |
10000 | Script execution timeout (ms) |
plotters-skill.preferredModel |
gpt-4o | Copilot LLM model family |
plotters-skill.showSource |
false | Auto-expand generated TypeScript in chat |
License
MIT