The Grammar of Graphics: Wilkinson's Contribution

The Grammar of Graphics: Wilkinson's Contribution

The previous post contrasted product management and service design representations, finding that neither tradition has explicit state models, formal transition specifications, or generative grammars; both rely on artefacts that leave crucial structure implicit. The question left open was what a more complete representational vocabulary might look like - what it would mean for a domain to have a grammar that could generate, validate, and compose its representations formally. This post examines what a grammar-based approach actually looks like, through Leland Wilkinson's Grammar of Graphics (2005), and considers what the grammar reveals not only about statistical visualisation but about the representational challenge that runs through this series: the problem of making state, transition, and composition visible in domains - whether machine learning systems, project governance, or service delivery - where they currently remain implicit.

Visualisation is not peripheral to this argument. Service design is already a visual practice; Segelström (2010) documents how service designers rely heavily on visualisation to render research material communicable and to support the synthesis of complex, multi-actor situations. Kimbell (2017) observes that one of service design's defining contributions is the effort to render services tangible and visible - to give form to interactions that would otherwise remain intangible. But as the representations post established, the visualisations that service design produces - journey maps, blueprints, personas, ecology maps - are informal; they encode professional judgement and experiential understanding but lack the formal properties that would make them generative, validatable, or composable. Wilkinson's grammar demonstrates what changes when a visual domain acquires formal representational structure, and the contrast illuminates both what service design's visual practices achieve and what they structurally cannot.

Before the Grammar

Before Wilkinson, creating statistical graphics was largely procedural. Each chart type - bar chart, scatter plot, histogram, pie chart - was implemented as a separate function with its own parameters and conventions; if one wanted a scatter plot with a regression line, or bars with error bars, or something that did not match a pre-defined type, one either found the right function or wrote custom code. Wilkinson (2005) calls this the "chart typology" approach: there is a catalogue of chart types, one picks from the catalogue, and the catalogue is finite. Novel combinations require new catalogue entries.

The problem, as Wilkinson recognised, is that chart types are not really separate things. A bar chart and a histogram are closely related - both use rectangular areas to represent quantities; a scatter plot and a line chart are related - both map data to spatial positions. The chart typology obscures these relationships by treating each combination of visual properties as a distinct entity, when in fact they are compositions of a smaller set of fundamental elements. Wilkinson's insight was that graphics have grammar in a non-metaphorical sense: just as natural language sentences are composed from words according to syntactic rules, graphics are composed from elements according to compositional rules, and a finite set of fundamental components can generate an infinite variety of valid graphics through systematic combination.

The Grammar's Architecture

Wilkinson's grammar specifies six core components, each addressing a different aspect of the graphic. DATA operations create variables from datasets - loading, selecting, joining, and deriving. TRANS (transformations) modify data before it is graphed - mathematical functions, statistical summaries, binning and categorisation. SCALE transformations map data values to aesthetic values, determining how quantities become visual positions, sizes, and colours through linear, logarithmic, categorical, or temporal mappings. COORD specifies the coordinate system in which the graphic is drawn - Cartesian, polar, geographic, or parallel coordinates. ELEMENT specifies the graphical marks that represent data - points, lines, areas, bars, text. And GUIDE specifies the annotations that help readers interpret the result - axes, labels, legends, titles, and reference lines.

A graphic is specified by composing statements from these components: one specifies a data source, transformations, scales, a coordinate system, graphical elements, and guides, and the result is a complete specification that can be rendered into a visual output. The power of the approach lies in what Wickham (2010), who implemented Wilkinson's grammar in R as the ggplot2 library, calls its "layered" quality: each component can vary independently, so that changing the element from points to lines transforms a scatter plot into a line chart, changing the coordinate system from Cartesian to polar transforms a bar chart into a radial plot, and adding another element layer creates a multi-layered graphic. The grammar generates variety not through enumeration of types but through combinatorial composition of orthogonal components.

Munzner (2014) situates Wilkinson's contribution within a broader understanding of visualisation as a discipline concerned with the relationship between visual encoding and analytical reasoning. The choice of how to visually encode data is not merely an aesthetic decision but an epistemic one; different encodings make different patterns visible, foreground different relationships, and afford different analytical operations. Wilkinson's grammar formalises this by making the encoding choices explicit and compositional - each component of the specification corresponds to a decision about how data will become visible, and the specification as a whole can be reasoned about, validated, and systematically varied.

What Formal Representation Enables

The grammar enables several things that the chart typology approach does not. Because the components are orthogonal, one can systematically explore the space of possible graphics by treating each component as a parameter to be varied - what happens if we use polar coordinates, or add a colour aesthetic, or facet by category. Because a specification either satisfies the grammar or it does not, the grammar enforces consistency and supports automatic validation; one cannot specify a graphic with conflicting components without the system detecting the conflict. Where components are not specified, the system can provide principled defaults - linear scales, automatically generated guides - so that simple graphics have simple specifications while complex graphics are built by progressively overriding defaults. And because the specification is separate from the rendering engine, the same grammar can be implemented in different tools; Wilkinson's original implementation was in SPSS, Wickham's in R, and the grammar's influence extends to D3, Vega, and numerous other libraries.

The deeper significance of these properties is that they transform the practitioner's relationship to the domain. Under the chart typology, the practitioner selects from a fixed catalogue; under the grammar, the practitioner composes within a generative space. The grammar does not merely provide more chart types; it provides a different way of thinking about what a chart is - a composition of independent representational decisions rather than a fixed template to be selected. This is precisely the transformation that Schön (1983) describes when he distinguishes between technical problem-solving within a given framework and reflective practice that reshapes the framework itself; the grammar gives the practitioner a framework within which to reason about visualisation rather than merely to execute it.

Visualisation, Service Design, and the Representational Gap

Service design is, as noted above, already a visual practice. Journey maps, blueprints, personas, and ecology maps are all visual artefacts; they are how service designers render the intangible tangible, how they communicate complex multi-actor situations, and how they support collaborative reasoning about services that do not yet exist (Segelström, 2010; Kimbell, 2017). The question is not whether service design uses visualisation but whether its visualisations have the representational properties that would make them formally generative, validatable, and composable.

The answer, as the representations post established, is that they do not. Journey maps do not have the formal properties that would allow them to be composed according to rules and validated for completeness; blueprints do not specify states and transitions formally enough to support simulation; personas do not compose into system models. These are powerful thinking tools, but they are thinking tools in the way that a sketch is a thinking tool - they support cognition without constraining it, which means they also cannot verify, validate, or generate. The contrast with Wilkinson's grammar is instructive: before the grammar, statistical graphics were also produced through informal professional practice; the grammar transformed the domain by making the representational decisions explicit, compositional, and subject to formal reasoning. The question for service design is whether an analogous transformation is possible, and what it would require.

State Spaces as a Representational Problem

The state-space discussion that runs through this series - from computational planning through the military design distinction to the analysis of representational traditions - is, at its core, a representational problem. The issue is not that state spaces are unknown or theoretically unavailable; it is that the representational practices of both product management and service design do not make them visible. A roadmap does not show states; a journey map gestures at phases but does not specify them formally; a backlog lists work items but not the state space they collectively construct.

Harel (1987), in creating statecharts, was explicit about this. He titled his foundational paper "Statecharts: A Visual Formalism for Complex Systems", and the emphasis on visual formalism is deliberate: the innovation was not the concept of state (which was already well established in automata theory) but a representational system that could make concurrent, hierarchical, and conditional state behaviour visible and tractable for human reasoning while remaining formally precise enough for computational analysis. Harel (1988) argues more broadly that the design of visual formalisms is itself a critical problem - that the right visual notation can transform how practitioners understand and work with complex systems, just as algebraic notation transformed mathematics. The parallel with Wilkinson is direct: both Wilkinson and Harel created formal visual languages that made previously implicit structure explicit, compositional, and amenable to systematic reasoning.

Whether the system in question involves machine learning model states (which models have been trained, which datasets are available, what performance thresholds have been met), project governance states (which approvals have been obtained, what dependencies remain, what resources are committed), or service delivery states (what stage of a process the user has reached, what the provider has committed to, what channels are active), the fundamental challenge is the same: making state, transition, and composition visible in a way that supports formal reasoning. The representational traditions of product management and service design do not currently do this, and the result is that practitioners operate with implicit, inconsistent, and incomplete models of the state spaces they are navigating - the condition that the planning/design post identified as the root of premature planning.

Toward Service Grammars

If services were to have a grammar analogous to Wilkinson's - a formal system for specifying services through composition of fundamental elements - what would the components be? Drawing on the work explored across this series, the components might include actors (the entities involved, following Iqbal's framework), promises (the commitments between actors, from Promise Theory), states (the configurations actors can occupy, from state space thinking), transitions (the events and conditions that change states, drawing on Harel's statecharts), channels (the media through which interactions occur), and evidence (the tangible manifestations of the service, following Shostack). A service specification in such a grammar would compose these components much as a Wilkinson specification composes data, transformations, scales, coordinates, elements, and guides - each component addressing a different dimension of the service, the combination producing a complete, validatable specification.

The point is not to propose a specific grammar; it is to recognise that the challenge is representational. Wilkinson demonstrated that a complex creative domain can be systematised through grammar without losing expressiveness. Harel demonstrated that a complex formal domain can be made visually tractable through the right representational system. Service design currently lacks both: it has neither a generative grammar for composing service specifications nor a visual formalism for making service states and transitions visible and formally tractable. The next posts explore partial answers to this challenge - Frost's compositional hierarchy for user interfaces, service patterns as reusable components, and a proposal for what a grammar of services might look like - each offering different aspects of what a formal representational system for services would require.

Next: "Atomic Design: Frost's Compositional Hierarchy" - how Brad Frost structured UI design as atoms, molecules, organisms, templates, and pages.

References

Harel, D. (1987). Statecharts: A Visual Formalism for Complex Systems. Science of Computer Programming, 8(3), 231-274.

Harel, D. (1988). On Visual Formalisms. Communications of the ACM, 31(5), 514-530.

Kimbell, L. (2017). The Turn to Service Design. In Julier, G. and Moor, A. (eds.) Design and Creativity: Policy, Management and Practice. Bloomsbury Academic.

Munzner, T. (2014). Visualization Analysis and Design. CRC Press.

Schön, D. (1983). The Reflective Practitioner: How Professionals Think in Action. Basic Books.

Segelström, F. (2010). Visualisation in Service Design. Licentiate thesis, Linköping University.

Wickham, H. (2010). A Layered Grammar of Graphics. Journal of Computational and Graphical Statistics, 19(1), 3-28.

Wilkinson, L. (2005). The Grammar of Graphics (2nd ed.). Springer.