Evaluating MLLMs on figure reproduction, integrating multimodal comprehension and generation.
Abstract: Our benchmark offers (1) a comprehensive dataset and multi-dimensional evaluation pipeline; (2) an up-to-date leaderboard on MLLM figure reproduction proficiency; and (3) a nuanced understanding of the perceiving and reasoning bottlenecks hindering unified comprehension and generation in current MLLMs.
- [2026/10/9] 🔥 The FigCodeBench dataset will be hosted and version-tracked on Hugging Face, and will be permanently accessible at CCZZJJ/FigCodeBench.
- [2026/10/8] 🔥 Github repo for FigCodeBench is online.
Researchers often have a scientific figure and need working code that reproduces it. For a model, this means turning visual structure into a rendered program, not merely describing the image or answering questions about it. We argue that text-only coding tests and image-understanding tests leave this perception-to-generation step unmeasured. This project has proposed a novel evaluation benchmark, aiming to assess the model's ability to observe complex charts (such as line graphs, bar charts, scatter plots, architecture diagrams, etc.) and generate corresponding reproducing code. This not only tests the model's visual perception and fine-grained understanding, but also significantly challenges its logical reasoning and alignment ability in generating code.
- 📈 Comprehensive:Containing 6,194 image-code pairs, covering four programming languages (Python, Matlab, R, and Latex).
- 🛠️ Automatic:Providing image-oriented, code-oriented metrics, Mean Machine Opinion Score, and Figure-Code Fidelity metric.
- 🏆 24 MLLMs:In-depth experiments were conducted on 24 mainstream MLLMs, revealing the capability boundaries of different models in the "figure-to-code" task, as well as their adaptability to different programming languages and common error patterns.
- Huggingface: Downloading link
| Directory | Language | Source Code Extension |
|---|---|---|
python/ |
Python | .py |
Matlab/ |
MATLAB | .m |
R/ |
R | .R |
latex/ |
LaTeX | .tex |
Figure images are stored in PNG format. Auxiliary information is provided in text files whose names end with _auxinfo.txt.
Each language directory contains two subsets:
exemplary/user_generated/
Both subsets follow the same six-directory structure:
<language>/
├── exemplary/
│ ├── code_base/
│ ├── code_variant1/
│ ├── code_variant2/
│ ├── image_base/
│ ├── image_variant1/
│ └── image_variant2/
└── user_generated/
├── code_base/
├── code_variant1/
├── code_variant2/
├── image_base/
├── image_variant1/
└── image_variant2/
| Directory | Contents |
|---|---|
code_base/ |
Source code and auxiliary information for the base collection |
code_variant1/ |
Source code and auxiliary information for the first variant collection |
code_variant2/ |
Source code and auxiliary information for the second variant collection |
image_base/ |
Figure images for the base collection |
image_variant1/ |
Figure images for the first variant collection |
image_variant2/ |
Figure images for the second variant collection |
The variant collections contain modified figure-code examples. Their sizes may differ from the base collection, so users should not assume that every base example has both variants.
The Python, MATLAB, and R collections organize files into six visualization categories within each code and image directory:
<code_or_image_directory>/
├── Composition/
├── Geospatial/
├── Mathematical/
├── Relational/
├── Statistical/
└── Temporal/
These categories cover composition-based visualizations, geographic plots, mathematical graphics, relationship-based charts, statistical graphics, and time-oriented visualizations.
The LaTeX collection (Conceptual) uses a flatter structure: source code, auxiliary information, and images are stored directly in their respective version directories, without the six category subdirectories.
| Collection | Runtime / Toolchain | Main Libraries or Settings |
|---|---|---|
| Python | Python | Primarily matplotlib and seaborn; missing packages are automatically detected and installed during execution |
| MATLAB | MATLAB R2023a | Additional toolboxes may be required by individual scripts |
| R | R 4.6.0 | Missing R packages are automatically detected and installed during execution |
| LaTeX | A TeX distribution providing XeLaTeX | xelatex as the rendering engine; 300 DPI for rasterized output |
The Python collection primarily uses Matplotlib and Seaborn for plotting. The execution workflow automatically detects missing packages in the local Python environment and installs them during execution, helping prevent figure-generation errors caused by missing dependencies.
pip install matplotlib seaborn
python FigCodeBench/figure_generation/generating_python.pyThe MATLAB collection uses MATLAB R2023a as the reference local environment. Some examples may require additional MATLAB toolboxes.
python FigCodeBench/figure_generation/generating_matlab.pyThe R collection uses R 4.6.0 as the reference environment. The execution workflow automatically detects missing packages in the local R environment and installs them during execution, helping prevent figure-generation errors caused by missing dependencies.
python FigCodeBench/figure_generation/generating_R.pyThe LaTeX collection uses XeLaTeX as the configured rendering engine. Install a TeX distribution that includes xelatex, together with the packages and fonts required by the examples.
pip install pdf2image
python FigCodeBench/figure_generation/generating_latex.pypdflatex may be used for examples that are compatible with it, but it is not the reference engine. Examples that depend on XeLaTeX-specific font or Unicode features may not compile with pdflatex.
We select 24 up to date and prevailing MLLMs for evaluation including 11 proprietary MLLMs and 13 open-source MLLMs.
Left: Mean Machine Opinion Score (MMOS) versus average cost per problem for various models. Right: Performance comparison of six representative models on different image categories.
Results on Mean Machine Opinion Score (MMOS) (click to expand)
- Detailed MMOS distribution
- Qualitative results
Please contact the first author of this paper for queries.
- Zijian Chen,
zijian.chen@sjtu.edu.cn
Please feel free to cite our paper:
@misc{chen2026pixelcodingevaluatingfigure,
title={From Pixel to Coding: Evaluating the Figure Reproduction Capabilities of MLLMs},
author={Zijian Chen and Zhengyu Chen and Bohan Liang and Lirong Deng and Yushuo Zheng and Yanwei Jiang and Qi Jia and Kaiwei Zhang and Wenjun Zhang and Guangtao Zhai},
year={2026},
eprint={2610.10066},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2610.10066},
}










