Aligned Multi-View Scripts for Universal Chart-to-Code Generation
Zhihan Zhang, Lizi Liao

TL;DR
This paper introduces Chart2NCode, a large dataset of charts with aligned scripts in multiple languages, and proposes CharLuMA, a multimodal model that effectively generates executable chart code across Python, R, and LaTeX.
Contribution
The work provides a new multi-language chart-to-code dataset and a parameter-efficient model that improves cross-language code generation fidelity and executability.
Findings
CharLuMA outperforms open-source baselines in code accuracy and visual fidelity.
Balanced multi-language supervision enhances performance across all target languages.
The adapter design enables sharing core understanding while allowing language-specific specialization.
Abstract
Chart-to-code generation converts a chart image into an executable plotting script, enabling faithful reproduction and editable visualizations. Existing methods are largely Python-centric, limiting practical use and overlooking a critical source of supervision: the same chart can be expressed by semantically equivalent scripts in different plotting languages. To fill this gap, we introduce Chart2NCode, a dataset of 176K charts paired with aligned scripts in Python, R, and LaTeX that render visually equivalent outputs, constructed via a metadata-to-template pipeline with rendering verification and human quality checks. Building on a LLaVA-style architecture, we further propose CharLuMA, a parameter-efficient adaptation module that augments the multimodal projector with a language-conditioned mixture of low-rank subspaces, allowing the model to share core chart understanding while…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
