图形的分层语法

A Layered Grammar of Graphics

Journal of Computational and Graphical Statistics · 2009
被引 402 · 同刊同年前 3%
ABS 3

中文导读

本文在Wilkinson等人工作的基础上,扩展并完善了图形语法,介绍了为R语言开发的ggplot2实现,通过示例展示如何用语法描述图形组件及其交互,并探讨了感知问题。

Abstract

A grammar of graphics is a tool that enables us to concisely describe the components of a graphic. Such a grammar allows us to move beyond named graphics (e.g., the “scatterplot”) and gain insight into the deep structure that underlies statistical graphics. This article builds on Wilkinson, Anand, and Grossman (2005), describing extensions and refinements developed while building an open source implementation of the grammar of graphics for R, ggplot2. The topics in this article include an introduction to the grammar by working through the process of creating a plot, and discussing the components that we need. The grammar is then presented formally and compared to Wilkinson’s grammar, highlighting the hierarchy of defaults, and the implications of embedding a graphical grammar into a programming language. The power of the grammar is illustrated with a selection of examples that explore different components and their interactions, in more detail. The article concludes by discussing some perceptual issues, and thinking about how we can build on the grammar to learn how to create graphical “poems.” Supplemental materials are available online.

数据可视化统计图形R语言计算机图形学