Skip to main content

Augplot

Describe a plot, refine it in place, and reuse the generated Python

Pass Augplot your notebook data and describe what you want to see. Refine the visualization in plain language, then reuse or export the generated Matplotlib or Seaborn code.

Quick start

Augplot supports Python 3.11 through 3.14.

pip install augplot

Configure a supported model and its provider credentials:

export AUGPLOT_MODEL="openai/YOUR_MODEL_ID"
export OPENAI_API_KEY="..."

Then work directly with data already in your notebook:

import augplot as ap

flights = ap.load_sns_dataset("flights")
viz = ap.plot(
    flights,
    prompt="Plot monthly airline passengers over time, with one line per year.",
)
viz.refine(
    "Turn this into a year-by-month heatmap and highlight the busiest month."
)
viz.to_python(function_name="plot_monthly_passengers")

Open or download the example notebook to try the complete workflow.

What can data be?

ap.plot(data) accepts these nonempty, in-memory Python objects:

Input Typical use
pandas.DataFrame Rows and columns, including dates and categories.
pandas.Series One labeled sequence of values.
numpy.ndarray One- or two-dimensional numeric or mixed data.
list or tuple Values such as [2, 4, 6], or records such as [{'x': 1, 'y': 2}].
dict Columns such as {'x': [1, 2], 'y': [2, 3]}, or nested results keyed by model and metric.

Nested lists and dictionaries can contain ordinary scalars, missing values, NumPy arrays, and Pandas objects. Parsed JSON is therefore a valid input when its root is a nonempty list or dictionary:

import json

records = json.loads('[{"month": "Jan", "sales": 10}, {"month": "Feb", "sales": 12}]')
viz = ap.plot(records)

results = {
    "baseline": {"test_f1": [0.3, 0.4, 0.5]},
    "candidate": {"test_f1": [0.4, 0.5, 0.6]},
}
viz = ap.plot(results, prompt="Compare F1 scores across models")

Pass the parsed object, not a JSON string or file path. Empty inputs, cyclic containers, custom objects, and NumPy arrays with zero or more than two dimensions raise DataError. For a Pandas Index, another table library, or an iterator, convert to one of the types above first.

Workflow

  • plot() generates the initial visualization.
  • refine() revises the current version and can be repeated.
  • render() applies the current visualization to compatible data without a model call.
  • to_python() exports the current version as standalone Matplotlib or Seaborn code.

Only plot() and refine() may call the configured model. Reuse and export stay local:

viz.render(new_data)
viz.figure.savefig("passengers.png", dpi=300)
viz.to_python(function_name="plot_monthly_passengers")

Inspect the current implementation with viz.code. The exported module needs neither Augplot nor provider credentials.

Configuration

Pass options directly to ap.plot():

viz = ap.plot(
    data,
    backend="seaborn",       # auto, matplotlib, or seaborn
    display_format="retina", # retina, png, or svg
    show=True,
)

See the API and workflow reference for all ap.plot() options and inspectable attributes.

Use AUGPLOT_MODEL for the model and AUGPLOT_API_BASE for a custom endpoint. Providers use the credentials expected by LiteLLM. The configured model must support strict JSON Schema responses and be recognized as such by LiteLLM; unsupported combinations raise ConfigurationError before inference.

History

Generated and refined plots are saved in .augplot/plots. Matching steps replay without another model call. Use regenerate=True to request new code or cache_dir=None to disable persistence. See visualization history for the replay rules.

Data and generated code

Augplot sends the configured model a bounded profile of your data, including samples, field names, and statistics. This is not anonymization; sample_rows=0 omits samples but not all schema or summary information.

Generated Python is validated, then runs locally against a copy of the data. Rejected code never runs or saves. This is defense in depth, not an OS sandbox. See generated-code guardrails.

Augplot visualizes supplied data only. It can compute plot-related summaries and trends, but does not train models or return predictions, forecasts, or other analytical artifacts.

Beta and security

Augplot 0.1.1 is a beta release; APIs and saved-history formats may change before 1.0. Review generated code before sensitive or security-critical use, and report vulnerabilities through the security policy.

License

Augplot is licensed under the Apache License 2.0.

Development

python -m pip install -e '.[dev]'
python -m pytest
python -m ruff check .
python -m build

Metadata

Release files for augplot 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for augplot 0.1.1
File Size Uploaded
augplot-0.1.1.tar.gz 1.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for augplot 0.1.1
File Interpreter ABI Platform
augplot-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.6 MB

Release files / augplot-0.1.1.tar.gz

Download URL augplot-0.1.1.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
9b908228cb0b307becc58d99e17959e40cf4d78c68f25e0c122fb263f27eb2c9
BLAKE2b-256 checksum
How to use checksums
e07669cb10e23ed4fc725c2870ba225d756d72a7b118b41ea7620fbb8497a6a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release files / augplot-0.1.1-py3-none-any.whl

Download URL augplot-0.1.1-py3-none-any.whl
Size 38.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd693cc7b790496679eeaf76f4338da153f177b2116ab96a19e96c25cf99dd1e
BLAKE2b-256 checksum
How to use checksums
0327ff3d8b9e1a6c323a4b8300cdcb32e6b9b8e79fae247867a288663adae14c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.0

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page