# Chart Plotter
Render bar, line, pie, scatter, and histogram charts from data, saved as PNG.
## What it does
- Plots from a CSV column or inline values using matplotlib.
- Supports bar, line, scatter, histogram, and pie.
- Labels axes and titles by default.
## Files
| File | Purpose |
|------|---------|
| `SKILL.md` | Instructions the agent receives on activation |
| `scripts/plot.py` | Plot a chart from a CSV or inline values |
| `references/chart-types.md` | Which chart to use for which question |
## Requirements
Installs `matplotlib` (and `pandas` for CSV input) on first use.
## License
Apache-2.0.
---
name: chart-plotter
display_name: Chart Plotter
description: "Plot charts from data: bar, line, pie, scatter, and histogram, saved as PNG. Use when the user wants to visualize numbers, a CSV column, a trend, a distribution, or asks for a chart/graph/plot of data. Do NOT use for diagrams of processes or architecture (use a diagram skill for those)."
license: Apache-2.0
---
# Chart Plotter
Render clean charts from inline data or a CSV file using matplotlib in the sandbox.
## When to use
The user wants to visualize numeric data — a bar/line/pie/scatter chart or a
histogram — as an image.
## Execution steps
1. **Get the data**: either a CSV under `/workspace`, or values the user gave you.
2. **Pick the chart type** that fits the question (see `references/chart-types.md`):
- bar = compare categories; line = trend over an ordered axis;
- pie = parts of a whole (few slices); scatter = relationship between two
numeric vars; histogram = distribution of one numeric var.
3. **Plot** with `python scripts/plot.py` — installs `matplotlib`/`pandas` on first
use. Examples:
- `plot.py bar --x Region --y Sales --csv data.csv -o chart.png`
- `plot.py line --x date --y value --csv ts.csv -o trend.png`
- `plot.py hist --y amount --csv data.csv --bins 30 -o dist.png`
- `plot.py pie --labels A,B,C --values 40,35,25 -o share.png`
4. **Report** the saved path and one sentence on what the chart shows.
## Rules
- Always label axes and give the chart a title.
- Don't use a pie chart for more than ~6 categories — use a bar chart instead.
- Handle missing values explicitly (drop or note them); never silently fabricate.
## Available resources
- `scripts/plot.py` — plot bar/line/pie/scatter/hist from a CSV or inline values.
- `references/chart-types.md` — which chart to use for which question.
Chart Plotter by langbot-team
Plot bar, line, pie, scatter, and histogram charts from data, saved as PNG.
Loading...