Skip to contents

ggbuilder provides a pipeline-based approach for building individual ggplot2 layers, analogous to dplyr-like data transformation pipelines.

Details

As an alternative to ggplot2 functions for controlling aesthetic evaluation like stage(), ggbuilder allows you to use function piping (i.e. |>) to chain data transformations, ggplot2::Stats, and ggplot2::Geoms together in order to construct layers.

  • See geom_() and stat_() for how to construct and chain geoms and stats using ggbuilder

  • See plot_data() for how to add data transformations into a layer definition

  • See remap() for how to apply transformations to aesthetics after scales have been calculated (analogous to ggplot2::after_scale()).