{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/matplotagent-method-and-evaluation-for-llm","title":"MatPlotAgent: Method and Evaluation for LLM-Based Agentic Scientific Data Visualization","arxiv_id":"2402.11453","date":"2024-02-18","proceeding":null,"authors":["Zhiyu Yang","Zihan Zhou","Shuo Wang","Xin Cong","Xu Han","Yukun Yan","Zhenghao Liu","Zhixing Tan","Pengyuan Liu","Dong Yu","Zhiyuan Liu","Xiaodong Shi","Maosong Sun"],"abstract":"Scientific data visualization plays a crucial role in research by enabling the direct display of complex information and assisting researchers in identifying implicit patterns. Despite its importance, the use of Large Language Models (LLMs) for scientific data visualization remains rather unexplored. In this study, we introduce MatPlotAgent, an efficient model-agnostic LLM agent framework designed to automate scientific data visualization tasks. Leveraging the capabilities of both code LLMs and multi-modal LLMs, MatPlotAgent consists of three core modules: query understanding, code generation with iterative debugging, and a visual feedback mechanism for error correction. To address the lack of benchmarks in this field, we present MatPlotBench, a high-quality benchmark consisting of 100 human-verified test cases. Additionally, we introduce a scoring approach that utilizes GPT-4V for automatic evaluation. Experimental results demonstrate that MatPlotAgent can improve the performance of various LLMs, including both commercial and open-source models. Furthermore, the proposed evaluation method shows a strong correlation with human-annotated scores.","url_abs":"https://arxiv.org/abs/2402.11453v3","url_pdf":"https://arxiv.org/pdf/2402.11453v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"matplotagent-method-and-evaluation-for-llm","repo_url":"https://github.com/thunlp/matplotagent","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok"}}],"tasks":[{"task_slug":"code-generation","task_name":"Code Generation"},{"task_slug":"data-visualization","task_name":"Data Visualization"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.11453","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.11453"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/thunlp/matplotagent","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":1,"ran":3},"by_repo_kind":{"official":{"samples":4,"ran":4,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":4,"samples":[{"code_sha256_prefix":"f41cb1a19b154297","entry":"encode_image","repo":"thunlp/matplotagent","repo_kind":"official","path":"evaluation/api_eval.py","file_url":"https://github.com/thunlp/matplotagent/blob/HEAD/evaluation/api_eval.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f41cb1a19b154297"}},{"code_sha256_prefix":"b0512df3d07ed5e4","entry":"fill_in_placeholders","repo":"thunlp/matplotagent","repo_kind":"official","path":"agents/utils.py","file_url":"https://github.com/thunlp/matplotagent/blob/HEAD/agents/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b0512df3d07ed5e4"}},{"code_sha256_prefix":"a057a130fc6989db","entry":"get_workspace_structure","repo":"thunlp/matplotagent","repo_kind":"official","path":"agents/utils.py","file_url":"https://github.com/thunlp/matplotagent/blob/HEAD/agents/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a057a130fc6989db"}},{"code_sha256_prefix":"7094487a0e020bf4","entry":"print_filesys_struture","repo":"thunlp/matplotagent","repo_kind":"official","path":"agents/utils.py","file_url":"https://github.com/thunlp/matplotagent/blob/HEAD/agents/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7094487a0e020bf4"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}