CSU-JPG/Chart2Code

[ACL-main-2026]We introduce Chart2Code, the first user-driven, hierarchical benchmark that systematically evaluates Large Multimodal Models on chart-to-code tasks of increasing difficulty.

30

stars

58

commits

Python

primary language

Aug 4, 2026

updated

csu-jpg.github.io/Chart2Code/
acl-main-2026

README

From charts to code: a hierarchical benchmark for multimodal models

Welcome to Chart2Code! If you find this repo useful, please give a star ⭐ for encouragement.

arXiv Project Page Code Hugging Face Dataset

🌟 Overview

Chart2Code-Benchmark is a new benchmark designed to evaluate chart generation capabilities of LMMs under progressively challenging conditions.

agent

Chart2Code covers three progressively challenging levels: reproduction, editing, and long-table to chart generation.
Level1(Chart Reproduction) reproduces charts from a reference figure and user query;
Level2(Chart Editing) involves complex modifications such as changing chart types or adding elements;
Level3(Long-Table to Chart Generation) requires models to transform long, information-dense tables into faithful charts following user instructions.

More details about Chart2Code in project page.🌐

🚀 Quick Start

Here we provide a quick start guide to evaluate LMMs on Chart2Code.

Setup Environment

git clone https://github.com/showlab/Chart2Code.git
conda env create -f environment.yaml
conda activate chart2code
cd Chart2Code

Setup API key and API base URL in .env for different LMMs. Claude、 Gemini and GPT are accessed through API proxy providers,while Seed is accessed through ARK API.

OPENAI_API_KEY=${your_api_proxy_provider_key}
ARK_API_KEY=${your_ark_api_key}
OPENAI_API_URL=${your_api_proxy_provider_url}
ARK_BASE_URL=${your_ark_api_base_url}

Download Data

Download the Chart2Code data from Huggingface and unzip it under the root directory.

wget https://huggingface.co/datasets/CSU-JPG/Chart2Code/resolve/main/data.zip
unzip data.zip

The file structure should be like this:

├── data
│   ├── level1_direct
│   │   ├── 3d_1.png
│   │   ├── 3d_1.py
│   │   └── ...
│   ├── level1_figure
│   │   ├── fig1_density_2
│   │   ├── ...
│   └── level1_customize
│       ├── table_1_instruction_2.png
│       ├── table_1_instruction_2.py
│       ├── table_1_instruction_2_request.txt
│       └── table_1_instruction_2_data.txt
│       └── ...
│   ├── level2
│   │   ├── bar_1_v1.png
│   │   ├── bar_1_v1.py
│   │   ├── bar_1_v1_data.txt
│   │   └── ...
│   └── level3
│       ├── table_1.xlsx
│       ├── table1_1.png
│       ├── table1_1_generate.py
│       ├── table1_1.txt
│       ├── table1_1_generate.png
│       └── ...
│   ├── level1_direct.json
│   ├── level1_figure.json
│   ├── level1_customize.json
│   ├── level2.json
│   └── level3.json
│—— Evaluation
└── ...

Inference Setup

Inference for each benchmark level is handled by a dedicated shell script located in the scripts/ directory. You must specify a model for each run. You can do this in two ways:

  • Pass it as an argument (Recommended): Provide the MODEL_IDENTIFIER directly when executing the script.
  • Edit the script: Set the MODEL_IDENTIFIER variable inside the corresponding .sh file.

You can modify the LOAD_SOURCE parameter in the shell script to select how the model is loaded:

  • local: By default, the model will be loaded from the Inference/models directory.
  • hub: The model weights will be loaded directly from the Hugging Face Hub online.

You can also adjust other parameters like GPU_VISIBLE_DEVICES in the script to fit your hardware setup.

cd scripts/inference
# For level1_customize
bash inference_customize.sh qwen3_customize_30B
# For level1_direct
bash inference_direct.sh qwen2.5_direct_72B
# For level1_figure
bash inference_figure.sh InternVL_3.5_figure_38B
# For level2
bash inference_level2.sh deepseek_level2
# For level3
bash inference_level3.sh gpt_5_level3
Available Models We now support the following models:
Model NameMODEL_IDENTIFIER
level1_customizelevel1_directlevel1_figurelevel2level3
InternVL-3.5-38BInternVL_3.5_customize_38BInternVL_3.5_direct_38BInternVL_3.5_figure_38BInternVL_3.5_level2_38BInternVL_3.5_level3_38B
InternVL-3.5-8BInternVL_3.5_customize_8BInternVL_3.5_direct_8BInternVL_3.5_figure_8BInternVL_3.5_level2_8BInternVL_3.5_level3_8B
InternVL-3-38BInternVL_3_customize_38BInternVL_3_direct_38BInternVL_3_figure_38BInternVL_3_level2_38BInternVL_3_level3_38B
InternVL-3-8BInternVL_3_customize_8BInternVL_3_direct_8BInternVL_3_figure_8BInternVL_3_level2_8BInternVL_3_level3_8B
InternVL-2.5-38BInternVL_2.5_customize_38BInternVL_2.5_direct_38BInternVL_2.5_figure_38BInternVL_2.5_level2_38BInternVL_2.5_level3_38B
InternVL-2.5-8BInternVL_2.5_customize_8BInternVL_2.5_direct_8BInternVL_2.5_figure_8BInternVL_2.5_level2_8BInternVL_2.5_level3_8B
Qwen3-VL-30Bqwen3_customize_30Bqwen3_direct_30Bqwen3_figure_30Bqwen3_level2_30Bqwen3_level3_30B
Qwen3-VL-30B-thinkqwen3_customize_30B_thinkqwen3_direct_30B_thinkqwen3_figure_30B_thinkqwen3_level2_30B_thinkqwen3_level3_30B_think
Qwen2.5-VL-72Bqwen2.5_customize_72Bqwen2.5_direct_72Bqwen2.5_figure_72Bqwen2.5_level2_72Bqwen2.5_level3_72B
Qwen2.5-VL-7Bqwen2.5_customize_7Bqwen2.5_direct_7Bqwen2.5_figure_7Bqwen2.5_level2_7Bqwen2.5_level3_7B
Qwen2-VL-72Bqwen2_customize_72Bqwen2_direct_72Bqwen2_figure_72Bqwen2_level2_72Bqwen2_level3_72B
Qwen2-VL-7Bqwen2_customize_7Bqwen2_direct_7Bqwen2_figure_7Bqwen2_level2_7Bqwen2_level3_7B
MOLMO-7B-Dmolmo_customize_7BDmolmo_direct_7BDmolmo_figure_7BDmolmo_level2_7BDmolmo_level3_7BD
MIMO-VL-7B-RL-thinkmimo_RL_customize_thinkmimo_RL_direct_thinkmimo_RL_figure_thinkmimo_RL_level2_thinkmimo_RL_level3_think
MIMO-VL-7B-RL-nothinkmimo_RL_customize_nothinkmimo_RL_direct_nothinkmimo_RL_figure_nothinkmimo_RL_level2_nothinkmimo_RL_level3_nothink
MIMO-VL-7B-SFT-nothinkmimo_SFT_customize_nothinkmimo_SFT_direct_nothinkmimo_SFT_figure_nothinkmimo_SFT_level2_nothinkmimo_SFT_level3_nothink
MIMO-VL-7B-SFT-thinkmimo_SFT_customize_thinkmimo_SFT_direct_thinkmimo_SFT_figure_thinkmimo_SFT_level2_thinkmimo_SFT_level3_think
LLaVA-OV-Qwen2-7B-OVllava_ov_customizellava_ov_directllava_ov_figureliava_ov_level2llava_ov_level3
LLaVA-OV-Qwen2-7B-SIllava_si_customizellava_si_directllava_si_figurellava_si_level2llava_si_level3
SEED-1.6-VLseed_1.6_customizeseed_1.6_directseed_1.6_figureseed_1.6_level2seed_1.6_level3
SEED-1.5-VLseed_1.5_customizeseed_1.5_directseed_1.5_figureseed_1.5_level2seed_1.5_level3
Claude-Sonnet-4claude_customizeclaude_directclaude_figureclaude_level2claude_level3
DeepSeek-VL-7Bdeepseek_customizedeepseek_directdeepseek_figuredeepseek_level2deepseek_level3
Gemini-2.5-Progemini_2.5_customizegemini_2.5_directgemini_2.5_figuregemini_2.5_level2gemini_2.5_level3
GLM-4V-9Bglm_customizeglm_directglm_figureglm_level2glm_level3
GPT-5gpt_5_customizegpt_5_directgpt_5_figuregpt_5_level2gpt_5_level3
Kimi-VL-A3Bkimi_customizekimi_directkimi_figurekimi_level2kimi_level3

Evaluate Setup

For the results obtained from inference, the first step is to check the execution rate. The code that runs successfully and its corresponding generated images will undergo the following evaluations: base_evaluation, LLM_evaluation, and LMM_evaluation.

cd scripts/evaluate
# step1: check execution rate
bash execute_evaluate.sh
# step2: run base evaluation
bash base_evaluator.sh
# step3: run LLM evaluation to evaluate the code
bash LLM_evaluator.sh
# step4: run LMM evaluation to evaluate the image
bash LMM_evaluator.sh

📢 Update

  • [2025.10.22] We release our paper in arxiv.

❤ Acknowledgement

  • Special thanks to Henry Hengyuan Zhao for serving as the Project Leader of this paper.

  • We are grateful to Lijian Wu, Zijian Zhang and Ziyuan Zhen for their hard work in data annotation, data clean and baseline testing.

  • We also extend our appreciation to Mao Dongxing, Yifei Tao, Lijian Wu, Zijian Zhang and Wan Yang for their contributions to this work.

🎓 BibTeX

If you find ChartCode useful, please cite using this BibTeX:

@inproceedings{tang2026charts,
  title={From charts to code: A hierarchical benchmark for multimodal models},
  author={Tang, Jiahao and Zhao, Henry Hengyuan and Wu, Lijian and Zhang, Zijian and Tao, Yifei and Mao, Dongxing and Wan, Yang and Tan, Jingru and Zeng, Min and Li, Min and others},
  booktitle={Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
  pages={13467--13566},
  year={2026}
}   

Contributors

accebet

58 commits

CSU-JPG/Chart2Code

[ACL-main-2026]We introduce Chart2Code, the first user-driven, hierarchical benchmark that systematically evaluates Large Multimodal Models on chart-to-code tasks of increasing difficulty.

30

stars

58

commits

Python

primary language

Aug 4, 2026

updated

csu-jpg.github.io/Chart2Code/
acl-main-2026

README

From charts to code: a hierarchical benchmark for multimodal models

Welcome to Chart2Code! If you find this repo useful, please give a star ⭐ for encouragement.

arXiv Project Page Code Hugging Face Dataset

🌟 Overview

Chart2Code-Benchmark is a new benchmark designed to evaluate chart generation capabilities of LMMs under progressively challenging conditions.

agent

Chart2Code covers three progressively challenging levels: reproduction, editing, and long-table to chart generation.
Level1(Chart Reproduction) reproduces charts from a reference figure and user query;
Level2(Chart Editing) involves complex modifications such as changing chart types or adding elements;
Level3(Long-Table to Chart Generation) requires models to transform long, information-dense tables into faithful charts following user instructions.

More details about Chart2Code in project page.🌐

🚀 Quick Start

Here we provide a quick start guide to evaluate LMMs on Chart2Code.

Setup Environment

git clone https://github.com/showlab/Chart2Code.git
conda env create -f environment.yaml
conda activate chart2code
cd Chart2Code

Setup API key and API base URL in .env for different LMMs. Claude、 Gemini and GPT are accessed through API proxy providers,while Seed is accessed through ARK API.

OPENAI_API_KEY=${your_api_proxy_provider_key}
ARK_API_KEY=${your_ark_api_key}
OPENAI_API_URL=${your_api_proxy_provider_url}
ARK_BASE_URL=${your_ark_api_base_url}

Download Data

Download the Chart2Code data from Huggingface and unzip it under the root directory.

wget https://huggingface.co/datasets/CSU-JPG/Chart2Code/resolve/main/data.zip
unzip data.zip

The file structure should be like this:

├── data
│   ├── level1_direct
│   │   ├── 3d_1.png
│   │   ├── 3d_1.py
│   │   └── ...
│   ├── level1_figure
│   │   ├── fig1_density_2
│   │   ├── ...
│   └── level1_customize
│       ├── table_1_instruction_2.png
│       ├── table_1_instruction_2.py
│       ├── table_1_instruction_2_request.txt
│       └── table_1_instruction_2_data.txt
│       └── ...
│   ├── level2
│   │   ├── bar_1_v1.png
│   │   ├── bar_1_v1.py
│   │   ├── bar_1_v1_data.txt
│   │   └── ...
│   └── level3
│       ├── table_1.xlsx
│       ├── table1_1.png
│       ├── table1_1_generate.py
│       ├── table1_1.txt
│       ├── table1_1_generate.png
│       └── ...
│   ├── level1_direct.json
│   ├── level1_figure.json
│   ├── level1_customize.json
│   ├── level2.json
│   └── level3.json
│—— Evaluation
└── ...

Inference Setup

Inference for each benchmark level is handled by a dedicated shell script located in the scripts/ directory. You must specify a model for each run. You can do this in two ways:

  • Pass it as an argument (Recommended): Provide the MODEL_IDENTIFIER directly when executing the script.
  • Edit the script: Set the MODEL_IDENTIFIER variable inside the corresponding .sh file.

You can modify the LOAD_SOURCE parameter in the shell script to select how the model is loaded:

  • local: By default, the model will be loaded from the Inference/models directory.
  • hub: The model weights will be loaded directly from the Hugging Face Hub online.

You can also adjust other parameters like GPU_VISIBLE_DEVICES in the script to fit your hardware setup.

cd scripts/inference
# For level1_customize
bash inference_customize.sh qwen3_customize_30B
# For level1_direct
bash inference_direct.sh qwen2.5_direct_72B
# For level1_figure
bash inference_figure.sh InternVL_3.5_figure_38B
# For level2
bash inference_level2.sh deepseek_level2
# For level3
bash inference_level3.sh gpt_5_level3
Available Models We now support the following models:
Model NameMODEL_IDENTIFIER
level1_customizelevel1_directlevel1_figurelevel2level3
InternVL-3.5-38BInternVL_3.5_customize_38BInternVL_3.5_direct_38BInternVL_3.5_figure_38BInternVL_3.5_level2_38BInternVL_3.5_level3_38B
InternVL-3.5-8BInternVL_3.5_customize_8BInternVL_3.5_direct_8BInternVL_3.5_figure_8BInternVL_3.5_level2_8BInternVL_3.5_level3_8B
InternVL-3-38BInternVL_3_customize_38BInternVL_3_direct_38BInternVL_3_figure_38BInternVL_3_level2_38BInternVL_3_level3_38B
InternVL-3-8BInternVL_3_customize_8BInternVL_3_direct_8BInternVL_3_figure_8BInternVL_3_level2_8BInternVL_3_level3_8B
InternVL-2.5-38BInternVL_2.5_customize_38BInternVL_2.5_direct_38BInternVL_2.5_figure_38BInternVL_2.5_level2_38BInternVL_2.5_level3_38B
InternVL-2.5-8BInternVL_2.5_customize_8BInternVL_2.5_direct_8BInternVL_2.5_figure_8BInternVL_2.5_level2_8BInternVL_2.5_level3_8B
Qwen3-VL-30Bqwen3_customize_30Bqwen3_direct_30Bqwen3_figure_30Bqwen3_level2_30Bqwen3_level3_30B
Qwen3-VL-30B-thinkqwen3_customize_30B_thinkqwen3_direct_30B_thinkqwen3_figure_30B_thinkqwen3_level2_30B_thinkqwen3_level3_30B_think
Qwen2.5-VL-72Bqwen2.5_customize_72Bqwen2.5_direct_72Bqwen2.5_figure_72Bqwen2.5_level2_72Bqwen2.5_level3_72B
Qwen2.5-VL-7Bqwen2.5_customize_7Bqwen2.5_direct_7Bqwen2.5_figure_7Bqwen2.5_level2_7Bqwen2.5_level3_7B
Qwen2-VL-72Bqwen2_customize_72Bqwen2_direct_72Bqwen2_figure_72Bqwen2_level2_72Bqwen2_level3_72B
Qwen2-VL-7Bqwen2_customize_7Bqwen2_direct_7Bqwen2_figure_7Bqwen2_level2_7Bqwen2_level3_7B
MOLMO-7B-Dmolmo_customize_7BDmolmo_direct_7BDmolmo_figure_7BDmolmo_level2_7BDmolmo_level3_7BD
MIMO-VL-7B-RL-thinkmimo_RL_customize_thinkmimo_RL_direct_thinkmimo_RL_figure_thinkmimo_RL_level2_thinkmimo_RL_level3_think
MIMO-VL-7B-RL-nothinkmimo_RL_customize_nothinkmimo_RL_direct_nothinkmimo_RL_figure_nothinkmimo_RL_level2_nothinkmimo_RL_level3_nothink
MIMO-VL-7B-SFT-nothinkmimo_SFT_customize_nothinkmimo_SFT_direct_nothinkmimo_SFT_figure_nothinkmimo_SFT_level2_nothinkmimo_SFT_level3_nothink
MIMO-VL-7B-SFT-thinkmimo_SFT_customize_thinkmimo_SFT_direct_thinkmimo_SFT_figure_thinkmimo_SFT_level2_thinkmimo_SFT_level3_think
LLaVA-OV-Qwen2-7B-OVllava_ov_customizellava_ov_directllava_ov_figureliava_ov_level2llava_ov_level3
LLaVA-OV-Qwen2-7B-SIllava_si_customizellava_si_directllava_si_figurellava_si_level2llava_si_level3
SEED-1.6-VLseed_1.6_customizeseed_1.6_directseed_1.6_figureseed_1.6_level2seed_1.6_level3
SEED-1.5-VLseed_1.5_customizeseed_1.5_directseed_1.5_figureseed_1.5_level2seed_1.5_level3
Claude-Sonnet-4claude_customizeclaude_directclaude_figureclaude_level2claude_level3
DeepSeek-VL-7Bdeepseek_customizedeepseek_directdeepseek_figuredeepseek_level2deepseek_level3
Gemini-2.5-Progemini_2.5_customizegemini_2.5_directgemini_2.5_figuregemini_2.5_level2gemini_2.5_level3
GLM-4V-9Bglm_customizeglm_directglm_figureglm_level2glm_level3
GPT-5gpt_5_customizegpt_5_directgpt_5_figuregpt_5_level2gpt_5_level3
Kimi-VL-A3Bkimi_customizekimi_directkimi_figurekimi_level2kimi_level3

Evaluate Setup

For the results obtained from inference, the first step is to check the execution rate. The code that runs successfully and its corresponding generated images will undergo the following evaluations: base_evaluation, LLM_evaluation, and LMM_evaluation.

cd scripts/evaluate
# step1: check execution rate
bash execute_evaluate.sh
# step2: run base evaluation
bash base_evaluator.sh
# step3: run LLM evaluation to evaluate the code
bash LLM_evaluator.sh
# step4: run LMM evaluation to evaluate the image
bash LMM_evaluator.sh

📢 Update

  • [2025.10.22] We release our paper in arxiv.

❤ Acknowledgement

  • Special thanks to Henry Hengyuan Zhao for serving as the Project Leader of this paper.

  • We are grateful to Lijian Wu, Zijian Zhang and Ziyuan Zhen for their hard work in data annotation, data clean and baseline testing.

  • We also extend our appreciation to Mao Dongxing, Yifei Tao, Lijian Wu, Zijian Zhang and Wan Yang for their contributions to this work.

🎓 BibTeX

If you find ChartCode useful, please cite using this BibTeX:

@inproceedings{tang2026charts,
  title={From charts to code: A hierarchical benchmark for multimodal models},
  author={Tang, Jiahao and Zhao, Henry Hengyuan and Wu, Lijian and Zhang, Zijian and Tao, Yifei and Mao, Dongxing and Wan, Yang and Tan, Jingru and Zeng, Min and Li, Min and others},
  booktitle={Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)},
  pages={13467--13566},
  year={2026}
}   

Contributors

accebet

58 commits

Languages

Python

94.8%

HTML

2.0%

Shell

2.0%