Credits
ggnext is an independent implementation, but it stands on a great deal of prior art and takes its vocabulary directly from it.
The grammar
The grammar comes from Leland Wilkinson’s The Grammar of Graphics (Springer, 2005) and, above all, from Hadley Wickham’s ggplot2. The API design — aes(), geom_*(), stat_*(), scale_*(), coord_*(), facet_*(), theme(), and composition with + — is preserved deliberately, so that anyone who knows ggplot2 already knows most of this package.
Prior art by area
The extended catalog follows conventions established by these packages. They are credited as design references, not as code ancestry.
| Area | Reference |
|---|---|
| Ridgeline / joyplots | ggridges |
| Alluvial and Sankey flows | ggalluvial, ggsankey |
| Network grammar | ggraph, igraph |
| Treemaps | treemapify |
| Radar / spider charts | ggradar |
| Streamgraphs | ggstream |
| Set intersections | ggupset, UpSetR |
| Chord diagrams | circlize |
| Parallel coordinates | GGally |
| Bump charts | ggbump |
| Label and extra geoms | ggforce, ggrepel, ggalt |
| Interactivity model | ggiraph, plotly |
| Animation grammar | gganimate |
| Plot composition | patchwork, cowplot |
| Survival and clinical figures | survminer, survival, cmprsk, swimplot, consort |
| Model explanation plots | DALEX, shapviz, iml, yardstick |
| Colour theory | Okabe & Ito palette; scales, viridis |
Algorithms
The layout and statistical algorithms are implemented from their published descriptions.
| Used for | Source |
|---|---|
| Tick placement | Paul Heckbert, “Nice Numbers for Graph Labels”, Graphics Gems (1990) |
| Treemap layout | Bruls, Huizing & van Wijk, “Squarified Treemaps” (2000) |
| Force-directed graphs | Fruchterman & Reingold, “Graph Drawing by Force-Directed Placement” (1991) |
| Streamgraph baselines | Byron & Wattenberg, “Stacked Graphs — Geometry & Aesthetics” (2008) |
| Survival estimation | Kaplan & Meier (1958); Aalen (1978), Johansen (1978) for competing risks |
| Box plot rule | Tukey, Exploratory Data Analysis (1977) |
| Method agreement | Bland & Altman, “Statistical methods for assessing agreement” (1986) |
| Convex hulls | Jarvis march (gift wrapping), 1973 |
| Contrast ratios | WCAG 2.x relative luminance |
Implementation
ggnext is built on S7, the R Consortium’s object system, which is the package’s only hard dependency. The rendering, scale, colour and layout code is written from scratch rather than wrapping the packages above; no code is copied from any of them.
If your work depends on one of the packages listed here, please cite it directly — they remain the reference implementations in their areas.