统计图形中的对比度感知标注:ggplot2的ggtwotone包
Contrast-Aware Annotation for Statistical Graphics: The ggtwotone Package for ggplot2
浏览论文内容
中文总结 AI 辅助
针对统计图形标注在异质亮度背景下可见性不足的问题,提出ggtwotone包,通过双描边渲染、自适应文本颜色和感知高亮调色板,结合WCAG/APCA对比度引擎,提升最坏情况对比度,并兼容ggplot2工作流。
中文摘要 AI 辅助
可读的标注对于解读统计图形至关重要,然而当常规的单色线条和标签跨越具有异质亮度的背景时,其可见性可能会降低。我们介绍了一种对比度感知的标注框架,该框架在ggplot2的ggtwotone R包中实现。该框架结合了双描边渲染、自适应文本颜色选择以及基于感知的高亮调色板,以提高标注在亮区和暗区的可见性。一个共享的对比度调整引擎支持基于WCAG和APCA的对比度标准,减少了手动调整颜色的需求。该包为线段、曲线、路径、数学函数、回归叠加和文本提供了对比度感知的几何对象,同时保持与标准ggplot2工作流程的兼容性。一项基于模拟的评估在异质背景颜色下进行,结果表明双描边标注和自适应文本选择在最坏情况下的对比度有所改善,同时也指出了随着请求的高亮颜色数量增加,感知分离方面存在权衡。在统计图形和科学图像中的应用展示了该框架在实际可视化场景中的实用性。总之,这些工具提供了一种可复现的方法,将对比度考虑直接纳入图形标注中。
英文摘要
Readable annotations are essential for interpreting statistical graphics, yet conventional single-color lines and labels can lose visibility when they cross backgrounds with heterogeneous luminance. We introduce a contrast-aware annotation framework implemented in the ggtwotone R package for ggplot2. The framework combines dual-stroke rendering, adaptive text-color selection, and perceptually guided highlight palettes to improve annotation visibility across light and dark regions. A shared contrast-adjustment engine supports WCAG- and APCA-based contrast criteria, reducing the need for manual color adjustment. The package provides contrast-aware geoms for segments, curves, paths, mathematical functions, regression overlays, and text while remaining compatible with standard ggplot2 workflows. A simulation-based evaluation across heterogeneous background colors demonstrates improved worst-case contrast for dual-stroke annotations and adaptive text selection, while also identifying trade-offs in perceptual separation as the number of requested highlight colors increases. Applications to statistical graphics and scientific images illustrate the framework in practical visualization settings. Together, these tools provide a reproducible approach for incorporating contrast considerations directly into graphical annotation.
发表机构
- University of Nebraska–Lincoln(内布拉斯加大学林肯分校)
机构由 AI 辅助整理,请以论文原文为准。