We present MatplotAlt, an open-source Python package for easily adding alternative text to Matplotlib figures. MatplotAlt equips Jupyter notebook authors to automatically generate and surface chart descriptions with a single line of code or command, and supports a range of options that allow users to customize the generation and display of captions based on their preferences and accessibility needs. Our evaluation indicates that MatplotAlt's heuristic and LLM-based methods to generate alt text can create accurate long-form descriptions of both simple univariate and complex Matplotlib figures. We find that state-of-the-art LLMs still struggle with factual errors when describing charts, and improve the accuracy of our descriptions by prompting GPT4-turbo with heuristic-based alt text or data tables parsed from the Matplotlib figure.
翻译:本文介绍MatplotAlt,一个用于为Matplotlib图形便捷添加替代文本的开源Python软件包。MatplotAlt使Jupyter笔记本作者能够通过单行代码或命令自动生成并呈现图表描述,并支持多种选项,允许用户根据个人偏好和可访问性需求自定义标题的生成与显示方式。评估结果表明,MatplotAlt基于启发式规则和大语言模型生成替代文本的方法,能够为简单单变量及复杂Matplotlib图形创建准确的长格式描述。我们发现前沿大语言模型在描述图表时仍存在事实性错误,通过向GPT4-turbo输入基于启发式规则生成的替代文本或从Matplotlib图形解析的数据表格,我们提升了描述的准确性。