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

# 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.

<Note>
  **Always use `arka` in front.** Every example below is an `arka …` command or `arka "natural language"`. In Fish you can also use bundled shortcuts like `chart …`, but docs and copy-paste examples use `arka` so routing is explicit.
</Note>

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

## Chart types

| Kind | CLI | Natural language (via `arka`) |
| - | - | - |
| line | `arka chart line AAPL TSLA --range 1y` | `arka "compare Apple and Tesla stock last year"` |
| bar | `arka chart bar --data "A:1,B:2"` | `arka "phone sales Apple 230 Samsung 210"` |
| pie | `arka chart pie --data "A:40,B:30"` | `arka "pie chart traffic organic 400 direct 300"` |
| scatter | `arka chart scatter --data "100:200,120:190"` | `arka "scatter ad spend vs revenue 100 200 120 190"` |
| histogram | `arka chart histogram --data "12,15,18,22"` | `arka "histogram response times 12 15 18 22"` |
| pareto | `arka chart pareto --data "A:45,B:28"` | `arka "pareto defects Scratches 45 Dents 28"` |
| prediction | `arka chart predict AAPL --days 30` | `arka "predict AAPL stock price chart next 30 days"` |
| model traits | `arka chart models --type scatter` | `arka "chart AI model characteristics scatter latency vs score"` |
| table image | `arka chart table sales.csv --title "Q1"` | `arka "render metrics.csv as table png"` |
| from file | `arka chart from metrics.csv --type line` | `arka "chart ~/data/metrics.csv as line"` |

## Dataset columns (flexible NL)

Any column names work. Arka parses axes from phrasing, not fixed keywords:

```bash theme={null}
arka "present time vs income from income.csv"
arka "plot monthly_revenue over fiscal_period from sales.csv"
arka "visualize payroll.csv with tenure and salary"
arka "chart from sales.csv by region value revenue"
```

Supported patterns: `Y over X`, `X vs Y`, `by X value Y`, `with X and Y`, `x-axis X y-axis Y`. Time-like columns auto-route to **line** charts; other `vs` pairs default to **scatter**.

## Natural language examples

Pass the phrase as a single quoted argument to `arka`:

```bash theme={null}
arka "make a chart of training loss"
arka "chart training loss 1:0.8 2:0.5 3:0.3"
arka "plot loss over epoch"
arka "plot X over Y 1:10 2:20 3:30"
arka "visualize metrics.csv"
arka "chart from csv sales.tsv as bar"
arka "graph my data"
```

## Direct CLI

```bash theme={null}
arka chart line AAPL TSLA --range 1y
arka chart predict RELIANCE.NS --days 30 --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"
arka chart table sales.csv --title "Q1 sales" --max-rows 25
```

## Table as PNG

Render a spreadsheet-style table (headers + rows) as a PNG — useful for slides, docs, or sharing CSV previews:

```bash theme={null}
arka chart table sales.csv
arka chart table metrics.csv --title "Experiment results" --max-rows 30 -o ~/Desktop/table.png
arka chart from report.csv --type table
```

Natural language:

```bash theme={null}
arka "render sales.csv as table png"
arka "table image from metrics.csv title 'Results'"
```

## 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.

## Future prediction (all domains)

Beyond stock tickers, Arka predicts futures from live data sources:

| Domain | Example | Data source |
| - | - | - |
| Weather | `arka predict future "weather in Delhi next 7 days" --chart` | Open-Meteo |
| Rainfall / monsoon | `arka predict future "monsoon rainfall in Mumbai" --chart` | Open-Meteo + ISRO MOSDAC notes |
| Stock | `arka chart predict AAPL --days 30` | Yahoo Finance |
| Satellite | `arka predict future "ISS pass over Bangalore"` | Open Notify |
| Kaggle CSV | `arka predict future "from kaggle owner/dataset next 30 days" --chart` | Kaggle API + trend |
| Local CSV | `arka predict future "forecast from metrics.csv" --chart` | Local file trend |

ISRO GSMaP satellite rainfall archives: set `MOSDAC_USER` and `MOSDAC_PASSWORD` in `.env` (see [MOSDAC API manual](https://mosdac.gov.in/downloadapi-manual)). Charts work without MOSDAC; credentials unlock HDF5 archive search.

```bash theme={null}
arka predict future "rainfall in Mumbai next 2 weeks" --chart
arka predict future "from kaggle heptapod/titanic next 30 days" --chart
arka chart predict --domain rainfall "monsoon in Pune" --days 14
```

Natural language:

```bash theme={null}
arka "predict monsoon rainfall in Mumbai next 2 weeks"
arka "forecast kaggle dataset heptapod/titanic next 30 days with chart"
```

Kaggle datasets need API credentials (`KAGGLE_USERNAME` / `KAGGLE_KEY` or `~/.kaggle/kaggle.json`). See [Kaggle datasets](/guides/kaggle).

### AI model characteristic charts

Compare LLM models with scatter plots (latency vs score) or bar charts (scores / local model size):

```bash theme={null}
arka benchmark run --dry-run          # populate benchmark-results.json first
arka chart models --type scatter    # latency vs score with labeled points
arka chart models --type score_bar --profile chat
arka chart models --type size_bar   # local Ollama models by parameter scale
```

Natural language:

```bash theme={null}
arka "chart AI model characteristics with data points"
arka "scatter plot of model latency vs benchmark score"
arka "graph LLM model comparison"
```

```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)
- [Arka CLI command and flag reference](/guides/cli.md)
- [Week of August 17, 2026](/changelog/2026-08-17.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.