Drawing Pandas: A Benchmark for LLMs in Generating Plotting Code

Timur Galimzyanov, Sergey Titov, Yaroslav Golubev, Egor Bogomolov
12/3/2024
cs.SEcs.AIcs.LG

Official code: JetBrains-Research/PandasPlotBench (13 stars, Apache-2.0, last commit 2025-11-28).

Abstract

This paper introduces the human-curated PandasPlotBench dataset, designed to evaluate language models' effectiveness as assistants in visual data exploration. Our benchmark focuses on generating code for visualizing tabular data - such as a Pandas DataFrame - based on natural language instructions, complementing current evaluation tools and expanding their scope. The dataset includes 175 unique tasks. Our experiments assess several leading Large Language Models (LLMs) across three visualization libraries: Matplotlib, Seaborn, and Plotly. We show that the shortening of tasks has a minimal effect on plotting capabilities, allowing for the user interface that accommodates concise user input without sacrificing functionality or accuracy. Another of our findings reveals that while LLMs perform well with popular libraries like Matplotlib and Seaborn, challenges persist with Plotly, highlighting areas for improvement. We hope that the modular design of our benchmark will broaden the current studies on generating visualizations. Our dataset and benchmark code are available online: https://huggingface.co/datasets/JetBrains-Research/PandasPlotBench; https://github.com/JetBrains-Research/PandasPlotBench.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Data visualization code generation benchmark: Evaluates LLMs' ability to generate visualization code from DataFrame descriptions.

135PythonNov 27, 202410 months agoApache-2.0

Similar Papers

Cite this paper

@article{galimzyanov2024drawing,
  title  = {Drawing Pandas: A Benchmark for LLMs in Generating Plotting Code},
  author = {Timur Galimzyanov and Sergey Titov and Yaroslav Golubev and Egor Bogomolov},
  year   = {2024},
  eprint = {2412.02764},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.02764v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.02764.svg)](https://codeofpaper.com/paper/2412.02764)

Discussion