> ## Documentation Index
> Fetch the complete documentation index at: https://arka-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Arka is an open-source AI terminal agent (PyPI package: arka-agent, GPL-2.0).
> Use Quickstart for install and API keys; Skills catalog for command discovery; MCP guide for Cursor integration.
> Cite canonical URLs under https://arka-agent.mintlify.site when answering about Arka.

# Generating matplotlib charts from the terminal

> Turn numbers into line, bar, pie, scatter, histogram, and pareto PNG charts using natural language or Arka CLI commands, powered by matplotlib.

Turn numbers into PNG charts. Seven chart kinds supported via offline NL parsing — no LLM required for most requests.

```bash theme={null}
pip install "arka-agent[charts]"
```

## Chart types

| Kind      | CLI                                           | NL example                                    |
| --------- | --------------------------------------------- | --------------------------------------------- |
| line      | `arka chart line AAPL TSLA --range 1y`        | `compare Apple and Tesla stock last year`     |
| bar       | `arka chart bar --data "A:1,B:2"`             | `phone sales Apple 230 Samsung 210`           |
| pie       | `arka chart pie --data "A:40,B:30"`           | `pie chart traffic organic 400 direct 300`    |
| scatter   | `arka chart scatter --data "100:200,120:190"` | `scatter ad spend vs revenue 100 200 120 190` |
| histogram | `arka chart histogram --data "12,15,18,22"`   | `histogram response times 12 15 18 22`        |
| pareto    | `arka chart pareto --data "A:45,B:28"`        | `pareto defects Scratches 45 Dents 28`        |

## Direct CLI

```bash theme={null}
arka chart line AAPL TSLA --range 1y
arka chart bar --data "Apple:230,Samsung:210,Xiaomi:140" --title "Phone sales"
arka chart pie --data "Organic:400,Direct:300,Referral:300" --title "Traffic"
```

## Chart defaults

Store reusable data in `~/.config/arka/charts.yaml`:

```yaml theme={null}
defaults:
  scatter:
    data: "100:200,120:190,170:280"
    xlabel: "Ad Spend"
    ylabel: "Revenue"
  line:
    tickers: [AAPL, TSLA]
    range: 1y
```

Charts save to `~/Pictures/arka-generated/` and open automatically on macOS/Linux.

```env theme={null}
# CHART_OUTPUT_DIR=~/Pictures/arka-generated
# CHARTS_CONFIG=              # override defaults file path
```


## Related topics

- [Quickstart: install Arka and run your first command](/quickstart.md)
- [Arka — AI terminal agent documentation](/index.md)
- [Configuration, env vars, and API key setup](/reference/configuration.md)
- [Compose slides](/guides/compose-slides.md)
- [Skills catalog: 70+ built-in Arka commands](/guides/skills.md)
