Description
PlotAI is a Python library that creates matplotlib plots from a plain-language prompt, using an LLM to write the plotting code. You give it a pandas DataFrame and a prompt. It sends the first five rows of the data and your prompt to the model, asks for Python code back, runs that code and displays the plot. The library has a single make() method and works in Python scripts and in Jupyter, Colab and VS Code notebooks. You install the package and add your OpenAI API key, either in a .env file or in your code. The default model is gpt-3.5-turbo, and other OpenAI models can be chosen. The README includes demo videos that analyse the GPD and Iris datasets. A prominent warning says PlotAI runs code generated by the LLM with exec(). That call is commented out in the executor file, and you must remove the comment yourself to use the package. The project is public on GitHub.…
Highlights
- Plots in matplotlib from a plain-language prompt
- Single make() method for scripts and notebooks
- Works in Jupyter, Colab and VS Code notebooks
- Choice of OpenAI models, default gpt-3.5-turbo
- Sends only the first five rows of your data
Ratings & Reviews
No ratings yet
Be the first to rate Plotai.
People also visit

figure-generation
Generate publication-quality scientific figures using matplotlib/seaborn
Plotai FAQ
Is it safe to run?
Be careful. The README warns that PlotAI executes code written by an LLM with exec(). That call is commented out in plotai/code/executor.py, and you need to remove the comment to use the package.
Do I need an account?
You need an OpenAI API key, which goes in a .env file or is passed in your code.
Which models can I use?
By default it uses gpt-3.5-turbo. The README shows how to pick a different OpenAI model.
What data goes to the model?
The first five rows of your DataFrame and your prompt, which the library uses to ask for Python code.
What are the best Plotai alternatives?
Popular alternatives to Plotai include VizGPT, Interactive Graph by LLM and AI Figure Generator. See all Plotai alternatives











