gog: A Grammar of Graphics
psychometrician · Zenodo (CERN European Organization for Nuclear Research) · 2026
gog is a grammar of graphics: one plotting engine written in Rust, callable from R, Python, Julia and JavaScript, in which a plot is a specification rather than drawing code. This book is its manual. It has 59 chapters, and every plot in it is drawn by the engine while the page builds, so no figure is a screenshot and no example is untested. The design follows Wilkinson's grammar with a discipline borrowed from Hangeul: a small orthogonal kernel, systematic derivation, no exceptions. There is no histogram function. There is a mark and a statistic, and bar * bin is a histogram; swap the mark for area or step and the same statistic is drawn a different way, with nothing added to the library to allow it. Licensing. The prose, structure and generated figures are CC BY-NC-SA 4.0. Every code sample is Apache 2.0, the same license as the engine, so examples may be used in commercial work without asking. Two preface figures are third-party: a page of the Hunminjeongeum, which is in the public domain, and a diagram by Paranocean from Wikimedia Commons, used unchanged under CC BY-SA 4.0, which keeps its own terms wherever the book goes. Authorship. Written by psychometrician. Substantial portions of the prose were drafted in collaboration with four Anthropic Claude models, which are credited by name in the book's preface. They are not listed as creators of this record, because a citation carries accountability that a model cannot hold. This deposit is a snapshot of the manual at version 0.0.3. The book is updated continuously at https://psychometrician.github.io/gog-book/, and new versions are deposited at package releases.