OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Data & Analytics

Plotai

PlotAI is an Apache-2.0-licensed Python library that uses an OpenAI language model to generate Matplotlib plotting code from a pandas DataFrame and a natural-language prompt. Its `make()` method is documented for use in Python scripts and Jupyter, Colab and VS Code notebooks.

Independent OpenViST project profile, based on linked sources.

Plotai — Prompt-driven chart generation in Python workflows
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when working in Python with a pandas DataFrame and an OpenAI API key, and a natural-language request is a useful starting point for a Matplotlib chart.

Who it is for

  • Python users who want to request Matplotlib charts in natural language from an existing pandas DataFrame.
  • Notebook and script authors exploring data who can review generated Python code and manage what data is sent to OpenAI.

Documented uses

  • Generate a chart from a DataFrame by describing the desired plot in a prompt.
  • Add prompt-based plot generation to a Python script or notebook.
  • Explore a dataset visually without writing all plotting code from scratch.
Before you choose

Requirements & limits

  • Requires an OpenAI API key; the documented default model is gpt-3.5-turbo, with gpt-4 shown as an alternative.
  • The first five DataFrame rows are sent to OpenAI, so consider sensitive data before use.
  • The README warns that executing model-generated Python code is unsafe; exec() is commented out by default in the described version.
  • The README characterizes the project as experimental and notes possible OpenAI token costs.
  • The repository identifies the license as Apache-2.0.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Set up PlotAI for prompt-based plotting

Install the package, configure an OpenAI API key and prepare the documented DataFrame-and-prompt workflow.

Before you start

  • Python environment
  • pandas DataFrame
  • OpenAI API key

Steps

  1. Install the package with the command below.

    Documented command
    pip install plotai
  2. Put OPENAI_API_KEY=your-key-here in a .env file, or set the key in Python using os.environ["OPENAI_API_KEY"].

  3. Import PlotAI and initialize it with a pandas DataFrame: plot = PlotAI(df).

  4. Request a plot with plot.make("make a scatter plot"). Check the repository's execution warning before enabling generated-code execution.

Expected outcome

A configured PlotAI object can receive a natural-language plotting request for a supplied DataFrame.

Guide limitations

  • The described workflow uses OpenAI; the README says the first five DataFrame rows are sent to the service.
  • Generated code execution is a security risk, and the described version has the exec() call commented out by default.
  • The project is described as experimental; OpenAI token usage may incur costs.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
16 November 2026
Original website title
mljar/plotai · Official homepage title · retained in its source language