Ggaction models chart creation as a chain of graphical actions

ggaction: A Grammar of Graphical Actions

Human-Computer InteractionGraphics

Summary

Making charts on a computer is usually described as a finished product, but actually building one happens step-by-step. The authors introduce ggaction, which treats each step as a separate action in a chain, making the process easier for people and machines to understand. This approach better matches how people think about making charts compared to other tools. Tests show ggaction is good at capturing common ways people build charts and is easier to interpret than popular systems like Vega-Lite and ggplot2.

What this means in practice

Authors

Hyeon Jeon, Jinwook Seo

Abstract

A chart may be declarative; authoring it is not. Visualization grammars often describe charts as finished specifications, whereas people construct them through a sequence of authoring actions. This mismatch can make visualization code difficult for humans to interpret and for machines to generate from human intent. ggaction addresses this gap by modeling the chart authoring process itself. In ggaction, individual authoring actions are abstracted as functions, and the authoring process is expressed as a chain of these functions. This representation more closely aligns chart designers' authoring intent with code specifications, making the code easily understandable to both humans and machines, including language models. Through a series of evaluations, we show that ggaction is sufficiently expressive to capture common chart authoring intents and outperforms widely used visualization grammars, including Vega-Lite and ggplot2, in both human and machine interpretability. ggaction is available at github.com/ggaction/ggaction.