title: VisCoder: Fine-Tuning LLMs for Executable Python Visualization Code
    Generation
summary: Large language models (LLMs) often struggle with visualization tasks like
  plotting diagrams, charts, where success depends on both code correctness and
  visual semantics. Existing instruction-tuning datasets lack execution-grounded
  supervision and offer limited support for iterative code correction, resulting
  in fragile and unreliable plot generation. We present VisCode-200K, a
  large-scale instruction tuning dataset for Python-based visualization and
  self-correction. It contains over 200K examples from two sources: (1) validated
  plotting code from open-source repositories, paired with natural language
  instructions and rendered plots; and (2) 45K multi-turn correction dialogues
  from Code-Feedback, enabling models to revise faulty code using runtime
  feedback. We fine-tune Qwen2.5-Coder-Instruct on VisCode-200K to create
  VisCoder, and evaluate it on PandasPlotBench. VisCoder significantly
  outperforms strong open-source baselines and approaches the performance of
  proprietary models like GPT-4o-mini. We further adopt a self-debug evaluation
  protocol to assess iterative repair, demonstrating the benefits of
  feedback-driven learning for executable, visually accurate code generation.
paper_authors._id: 6841090145662bb7d322ecc6
paper_authors.name: Yuansheng Ni
paper_authors.status: claimed_verified
paper_authors.statusLastChangedAt: 2025-06-05T10:00:04.196Z
paper_authors._id: 64de37ee5e192985054be575
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/64de37ee5e192985054be575/fVV7JQMtp_J3uFqszJJHH.jpeg
paper_authors.fullname: Yuansheng Ni
paper_authors.type: user
paper_authors.user: yuanshengni
paper_authors._id: 6841090145662bb7d322ecc7
paper_authors.name: Ping Nie
paper_authors._id: 6841090145662bb7d322ecc8
paper_authors.name: Kai Zou
paper_authors._id: 6841090145662bb7d322ecc9
paper_authors.name: Xiang Yue
paper_authors._id: 6841090145662bb7d322ecca
paper_authors.name: Wenhu Chen
paper_authors.status: admin_assigned
paper_authors.statusLastChangedAt: 2025-06-05T12:53:53.184Z
paper_authors._id: 6313a86154e6e5d9f0f94e04
paper_authors.avatarUrl: https://cdn-avatars.huggingface.co/v1/production/uploads/1662232951344-6313a86154e6e5d9f0f94e04.jpeg
paper_authors.fullname: Wenhu Chen
paper_authors.type: user
paper_authors.user: wenhu
paper_title: VisCoder: Fine-Tuning LLMs for Executable Python Visualization Code
    Generation
paper_summary: Large language models (LLMs) often struggle with visualization tasks like
  plotting diagrams, charts, where success depends on both code correctness and
  visual semantics. Existing instruction-tuning datasets lack execution-grounded
  supervision and offer limited support for iterative code correction, resulting
  in fragile and unreliable plot generation. We present VisCode-200K, a
  large-scale instruction tuning dataset for Python-based visualization and
  self-correction. It contains over 200K examples from two sources: (1) validated
  plotting code from open-source repositories, paired with natural language
  instructions and rendered plots; and (2) 45K multi-turn correction dialogues
  from Code-Feedback, enabling models to revise faulty code using runtime
  feedback. We fine-tune Qwen2.5-Coder-Instruct on VisCode-200K to create
  VisCoder, and evaluate it on PandasPlotBench. VisCoder significantly
  outperforms strong open-source baselines and approaches the performance of
  proprietary models like GPT-4o-mini. We further adopt a self-debug evaluation
  protocol to assess iterative repair, demonstrating the benefits of
  feedback-driven learning for executable, visually accurate code generation.
paper_ai_summary: VisCode-200K, a large-scale dataset for visualization, improves plot generation performance by integrating execution-grounded supervision and iterative code correction, outperforming open-source models and rivaling proprietary ones.
paper_ai_keywords: large language models LLMs visualization tasks plot generation execution-grounded supervision iterative code correction VisCode-200K Python-based visualization validated plotting code natural language instructions rendered plots correction dialogues Qwen2.5-Coder-Instruct VisCoder PandasPlotBench self-debug evaluation feedback-driven learning