---
name: terminal-line-plot
description: Draw readable ASCII line charts directly in the terminal from numeric series, command output, CSV, JSON, or manually extracted points. Use when the user asks for a curve, trend line, score progression, leaderboard trend, metric history, or any plot that should be visible in a CLI/chat transcript without opening a GUI or writing image files.
title: terminal-line-plot
canonical_url: https://skilld.dev/gh/sapientinc/praxist/terminal-line-plot
last_updated: 2026-09-21T10:32:48.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [agents/openai.yaml](https://skilld.dev/api/skills-raw/sapientinc/praxist/terminal-line-plot/agents/openai.yaml), [scripts/plot_series.py](https://skilld.dev/api/skills-raw/sapientinc/praxist/terminal-line-plot/scripts/plot_series.py).
>
> If the user asked to install this Skill, run `npx skilld install sapientinc/praxist/terminal-line-plot`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/terminal-line-plot`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/sapientinc/praxist/terminal-line-plot) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/terminal-line-plot`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/terminal-line-plot --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/terminal-line-plot --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Terminal Line Plot

Use this skill to turn numeric sequences into terminal-readable line charts.
It is task-agnostic: do not assume any domain, metric direction, filtering rule,
or data layout unless the user or artifacts define it.

## Workflow

1. Identify the series to plot:
   - x values are usually ordered steps, dates, versions, generations, epochs, or run ids.
   - y values must be numeric.
   - If multiple plausible metrics exist, choose the one the user asked for; otherwise state the selected metric before plotting.
2. Preserve metric semantics:
   - Use exact metric names from artifacts when available.
   - Label whether higher or lower is better if known.
   - Do not mix partial and complete points silently; mark provisional or incomplete points in the title, notes, or point list.
3. Use `scripts/plot_series.py` for deterministic plotting.
4. Print a compact table or point list when it prevents misreading the curve.
5. Do not write image files unless the user explicitly asks. Prefer stdout.

## Script Usage

Run the bundled script from the skill directory:

```bash
python /path/to/terminal-line-plot/scripts/plot_series.py \
  --points "0:-4.49,1:-4.53,2:-4.87,3:-4.77,4:-3.23" \
  --title "Best future_fitness by generation" \
  --x-label generation \
  --y-label future_fitness \
  --higher-better
```

Input options:

- `--points "x:y,x:y,..."` for quick point lists.
- `--csv FILE --x-field FIELD --y-field FIELD` for CSV.
- `--json FILE --x-field FIELD --y-field FIELD` for JSON arrays of objects, arrays of pairs, or mappings.
- `--stdin csv|json|points` to read data from stdin.

Useful options:

- `--height N` controls chart height.
- `--x-step N` controls horizontal spacing between points.
- `--provisional-x X` may be repeated to mark incomplete points with `○`.
- `--value-table` prints the plotted values below the chart.
- `--invert-y-note` only changes the note; it does not invert the axis.

## Plotting Guidelines

- Prefer line drawing characters `●`, `○`, `╱`, `╲`, and `─`.
- Keep the x-axis readable. If labels collide, increase `--x-step` or plot fewer points.
- Use a taller chart for noisy or close-valued curves.
- For negative scores where "higher is better", the visually higher point should still mean numerically larger.
- If the active/final point is incomplete, mark it provisional and do not draw conclusions from it.
- For dense data, aggregate intentionally: best per generation, mean per epoch bucket, rolling median, or another stated rule.

## Example Patterns

Manual points:

```bash
python /path/to/terminal-line-plot/scripts/plot_series.py \
  --points "0:7.88,1:7.78,2:8.45,3:8.61,4:9.28" \
  --title "Mean objective value by generation" \
  --y-label "objective" \
  --value-table
```

CSV:

```bash
python /path/to/terminal-line-plot/scripts/plot_series.py \
  --csv metrics.csv \
  --x-field generation \
  --y-field score \
  --title "Score by generation"
```

JSON:

```bash
python /path/to/terminal-line-plot/scripts/plot_series.py \
  --json metrics.json \
  --x-field gen \
  --y-field best_score
```
