FigMirror: Ground It, Code It, Plot It

Computer Vision and Pattern RecognitionArtificial Intelligence

Summary

The authors address the problem of making new scientific plots that look like an example plot's style, such as its colors and fonts, but with new data. Unlike past methods that just try to copy the example picture pixel by pixel, their method FiguresMirror uses a smart process to understand where things are in the plot and how to recreate their style using computer code. They created a new test called PlotTwin-Bench to check how well their method copies style and found it works better than other approaches. This helps scientists quickly make new plots that look consistent with their earlier work.

Authors

Xiaohan Zhao, Jiacheng Liu, Yaxin Luo, Zhiqiang Shen

Abstract

Converting scientific figures into executable code has gained increasing attention, yet existing methods primarily focus on reproducing the reference figure itself. A more practical setting is to plot new data while preserving the visual style of a reference figure (e.g., color scheme and typography). Prior approaches mimic the reference through pixel-level optimization and struggle to carry its style to new data. We show that the key to this task lies in the coordinate grounding and coding capabilities present in modern computer-use models. We propose FigMirror, an agentic framework that unlocks these capabilities through Grounded Measurement, which locates visual elements by coordinates and measures their properties through executable code. We further introduce PlotTwin-Bench, an expert-curated benchmark with fine-grained code and image-level style metrics. Experiments show that FigMirror consistently outperforms existing methods on reference-conditioned style transfer. All plots in this paper are generated by FigMirror, except those produced by other methods for comparison. Our code and data are available at: https://github.com/VILA-Lab/FigMirror.