Grammar of Graphics on 'base' Graphics
Overview
Implements a grammar of graphics on top of the 'base' graphics system. A 'bbplot' object is built incrementally with a '+' operator from data, aesthetic mappings and layers, then rendered with base graphics, so plotbb layers can be mixed with ordinary base plotting calls. The package provides layers for points, lines, bars, histograms, densities, boxplots, violins, ribbons, smooths, error bars and tiles, together with colour and other aesthetic scales, automatic legends, faceting, themes, coordinate flipping and significance annotations.
bb_density(),bb_hist()andbb_smooth()gainorientation = "horizontal", with the statistic on x and the values or groups on y (2026-10-18, Sun)bb_coord_flip()flips density, histogram and smooth layers; a supplied smooth formula is swapped with the mapping- horizontal summary labels put
density/counton the x axis - tests cover horizontal statistics, flipped formulas and their ranges
bb_lm()follows the shared grouping rule: an explicitgroup, then a discretex, thencol, thenfillfree_colour = TRUEnow fails clearly without an explicit colour scale instead of silently sharing one- grouped histograms align the plotted values with the group vector after dropping non-finite rows, fixing R-devel warnings
- examples use the native
|>pipe;magrittris no longer a dependency
From NEWS.md in the release
Install
Health
- OK13 OK2026-10-21
- NOTE11 OK, 2 NOTE2026-09-12
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-08
Show 2 earlier changesHide 2 earlier changes
- ERROR12 OK, 1 ERROR2026-06-07
- OK14 OK2026-03-10
Documentation
- Help pages
- 24
- Examples that run
- 100%9 run in a plain check
- Exported functions with examples
- 38%
- Documented parameters
- 99%
- Return-value docs
- 96%
- Help pages citing references
- 0%
- plotbb HTML
Downloads
Dependencies
Installing plotbb adds 10 packages (4 with compiled code, 4.4 MB of source tarballs). Heaviest: farver 1.2 MB, viridisLite 1.2 MB, rlang 766 KB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.0.0Latest2026-10-18 · current release · diff ↗ ·
removed 1 export
%>%added 22 exports
bb_build, bb_coord_flip, bb_facet_grid, bb_group_values, bb_hline, bb_layer, bb_position, bb_ribbon, bb_save, bb_scale_fill_gradient, bb_scale_fill_manual, bb_scale_fill_palette, bb_scale_x_continuous, bb_scale_x_date, bb_scale_x_log10, bb_scale_y_continuous, bb_scale_y_date, bb_scale_y_log10, bb_smooth, bb_violin, bb_vline, with_bb_theme - 0.1.2
- RR 4.6.0 released · 2026-04-24
- 0.1.1
- 0.1.02026-01-15 · diff ↗ ·
added 12 exports
bb_bar, bb_errorbar, bb_facet_wrap, bb_legend, bb_line, bb_scale_cex_continuous, bb_scale_cex_manual, bb_scale_col_gradient, bb_scale_col_manual, bb_scale_lty_manual, bb_scale_pch_manual, bb_segment - RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- 0.0.62021-09-08
- RR 4.1.0 released · 2021-05-18
Package metadata
- First published
- 2021-09-08
- Total releases
- 5 / 5 yrs
- License
- Artistic-2.0 OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 3.1 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("plotbb")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.