TL;DR
While Vision-Language Models (VLMs) excel at generating charts from scratch, real-world data visualization is an inherently iterative process of tweaking, debugging, and restyling. This paper introduces VisEditBench, a new benchmark of 1,395 human-annotated tasks designed to evaluate how well VLMs can edit existing visualization code based on multimodal feedback. The authors also propose VisEditAgent, an iterative, render-grounded framework that significantly improves editing success by executing code and visually validating the results in a loop.
What Problem Does This Paper Address?
Existing benchmarks for data visualization primarily focus on two paradigms: text-to-visualization (generating a chart from a natural language query) or chart-to-code (reconstructing a chart from an image). However, in practice, data scientists and analysts rarely get a chart perfect on the first try. They engage in a continuous cycle of refinement—fixing overlapping labels, adjusting poorly positioned legends, or altering the aesthetic to match a corporate style guide.
Editing visualization code requires a VLM to perform complex, localized multimodal reasoning. The model must understand the existing code, look at a flawed chart or a reference style image, determine exactly what needs to change visually, and modify the code precisely without altering the underlying data semantics. This paper addresses the lack of standardized benchmarks for this iterative, multimodal code-editing workflow.
Methods
To evaluate models effectively, the authors established a structured evaluation framework across five core metrics:
- Code Execution: Does the generated code run successfully and render a chart?
- Task Accuracy: Does the edited chart satisfy the user's instruction while preserving data semantics?
- Readability and Clarity: Are labels, legends, and annotations legible and non-overlapping?
- Visual Quality: Is the overall presentation polished, clean, and appropriately scaled?
- Visual Similarity: How closely does the rendered output match the intended target or reference style?
A strict Final Pass Rate is applied, meaning a task only "passes" if it executes perfectly, scores high on accuracy/readability/quality ($\ge 4.0$ or $4.5$ out of 5), and achieves a visual similarity score of at least 90/100.
VisEditAgent
To showcase how models can overcome one-shot generation limitations, the authors introduced VisEditAgent, a render-grounded agentic framework:
- Edit Planning: Analyzes the input code, chart, and instruction to identify the visual issue and formulate a modification strategy.
- Candidate Generation: Generates multiple distinct code-edit candidates.
- Visual Validation and Selection: Executes and renders each candidate into an image, evaluating them automatically to select the best option.
- Feedback-Based Refinement: Iteratively refines the chosen candidate using execution diagnostics and visual feedback to fix remaining errors.
Datasets
The authors introduced VisEditBench, which consists of 1,395 high-quality, human-annotated visualization code-editing tasks.
The dataset was constructed using a rigorous pipeline:
- Real-world Issues: 120 cases were manually harvested from Stack Overflow and GitHub issue reports for Matplotlib and Vega-Lite.
- Model Failures: The remaining cases were derived from model-generated chart failures on the Text2Vis benchmark, capturing realistic errors made by current state-of-the-art models.
- Annotation & Quality Control: Four annotators generated natural language instructions and metadata. Every task underwent independent cross-review, achieving an 84.65% inter-annotator agreement rate before filtering.
VisEditBench covers two primary settings: feedback-guided repair (fixing buggy or marked charts) and reference-guided restyling (matching a target chart's style). It spans 8 distinct editing intents (e.g., correctness repair, structural transformation, style adaptation) and includes 1,156 Matplotlib (imperative) and 239 Vega-Lite (declarative) examples.
Key Insights and Ideas
- Executability is Not the Bottleneck: Frontier models like Claude-4.6-Sonnet and GPT-4o boast execution success rates over 93%. However, their final pass rates are much lower because they struggle to faithfully implement the requested visual changes or maintain layout fidelity.
- Style Adaptation is a Major Blind Spot: Models are relatively good at localized fixes (correctness repair), but they fail significantly when asked to adapt a chart to a completely new reference style (e.g., matching a dark theme or specific font layouts).
- The Power of the Execution Loop: One-shot prompting often fails because small code changes cause cascading layout issues. Giving a model the ability to "see" its own rendered output and iteratively fix it (as done by VisEditAgent) is critical for reliable visualization authoring.
Key Results
- Proprietary vs. Open-Source Gap: Closed-source models dominate the benchmark. Claude-4.6-Sonnet achieved the highest zero-shot overall pass rate at 74.46%, followed by GPT-5 at 65.68%. Meanwhile, most open-source models fell below 50%, with Qwen3-VL-32B leading the open-source category at 51.72%.
- VisEditAgent Boosts Performance: When wrapping GPT-4o inside the iterative VisEditAgent framework, its overall pass rate jumped from 55.75% to 67.99%. The most dramatic improvement occurred in the challenging style adaptation category, where the pass rate skyrocketed from a meager 10.00% to 62.85%.
Limitations and Future Work
The authors note that VisEditBench currently only supports two visualization libraries: Matplotlib and Vega-Lite. While these represent major imperative and declarative paradigms, widely used ecosystems like Plotly, D3.js, and ggplot2 are not yet covered. Additionally, the benchmark focuses on common editing scenarios and does not exhaustively address highly specialized domain conventions or complex multi-panel configurations. Future work will look into expanding library coverage and exploring deeper domain-specific constraints.
Summary updated