The goal of ggr6 is to provide a modern developer-facing implementation of Wilkinson’s Grammar of Graphics using the best available tools.
You can install the development version from GitHub with:
# install.packages("remotes")
remotes::install_github("paleolimbot/ggr6")
Currently, there are no exported functions or classes, so to experiment
you’ll have to fork and use devtools::load_all(".")
.
graphic <- Graphic$new()$
add_layer(
Layer$new(
ggplot2::mpg,
mapping = ColumnMappingQuosure$new(x = cty, y = hwy, col = class),
geom = GeomPoint$new()
)
)$
theme_set(points.pch = 17)
Builder$new(graphic, GraphicsRenderer$new())$render()