Create a Flexible Forest Plot
Overview
Create a forest plot based on the layout of the data. Confidence intervals in multiple columns by groups can be done easily. The plot is built step by step with the pipe, adding the axis, the labels and a style, editing the plot, inserting/adding text, and much more.
Breaking changes
sizesis now a multiple of one line of text for both points and summary diamonds, where it used to becharfor one and a fraction of the row height for the other. **Summary diamonds are flatter than in 1.1.4**; pass a largersizesto restore the old look.- Point size now follows the theme's
base_sizeinstead of the pointsize of whichever device happened to be open. Unchanged at the defaultbase_size. - Summary rows in grouped plots grow to the height the group offsets need, rather than always doubling.
New features
- The plot is now built step by step with the pipe
|>.forest()draws the table and the confidence intervals, and the rest is added withset_xaxis()(limits, tick marks, scale and vertical lines),set_labs()(title, x-axis labels, footnote, arrow labels and legend text),scale_sizes()(point sizes from study weights) andset_style(). They must be used before the plot is edited withedit_plot()and the other editing functions. - Graphical parameters are set with
forest_style(), which takes onegpar()for each part of the plot and is given to the newstyleargument offorest().forest_theme()is superseded but keeps working, also withset_style();?forest_themeshows how its arguments map ontoforest_style(). - New
fitofforest_style()lets the plot use the space it is drawn in:"width"gives the free width to the CI columns and"both"also shares the free height between the rows. The default"none"keeps the natural size of the plot, as before. Theautofitargument ofprint()will be deprecated in favour of it. - New
scale_sizes()to scale study weights into point sizes, followingmetaforandmeta. Without it,sizesare used as they are (#37). - A warning is given when the plot is drawn if
sizesfalls outside 0.1 to 2, or if grouped confidence intervals are likely to overlap givennudge_y. - In the new functions, an argument left out keeps its current value and
NULLgoes back to the default.NAis only used for a CI column left at its default, as inxlim = list(c(0, 4), NA).
Superseded
Show all changes in 1.2.0Hide the rest of the changes in 1.2.0
- The arguments of
forest()that the functions above replace are still accepted and draw the same plot. Each of them gives a message once per session pointing to its replacement:xlim,ticks_at,ticks_digits,ticks_minor,x_transandvert_linetoset_xaxis(), andarrow_lab,xlab,titleandfootnotetoset_labs(), andthemetostyle. They will be removed in 2.0.0. forest()now gives a message once per session for an argument in...that neitherfn_ci,fn_summarynorindex_argstakes, instead of dropping it silently. The argument is still ignored.- The package now requires R >= 4.1.0 for the native pipe used in the examples.
Bug fixes
- Fix automatic
ticks_digitsdropping decimals on linear axes, which rendered fractional ticks with duplicated labels (e.g.1, 1.5, 2as "1", "2", "2"). - Fix error when
gpis passed toforestwith summary rows. - Error if the length of
estis not a multiple of the length ofci_column, instead of silently dropping the extra series. - Replace
gridtextwithgridmicrotexin the vignettes, so the annotation examples are typeset as real LaTeX math.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 27 (9 internal)includes a package overview page
- Examples that run
- 88%7 run in a plain check · 1 never run
- Exported functions with examples
- 50%
- Documented parameters
- 99%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 50
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
9 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/adayim/forestploter on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-09-30 · The repository has a site deploy workflow
pkgdown site last built 2026-09-30
Show all practicesHide 1 practice
Dependencies
Installing forestploter adds 6 packages (3 with compiled code, 2.2 MB of source tarballs). Heaviest: rlang 766 KB, cli 629 KB, gridExtra 469 KB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 1.2.0Latest2026-09-30 · current release · diff ↗ ·
added 5 exports
forest_style, scale_sizes, set_labs, set_style, set_xaxis - 1.1.42026-04-27 · diff ↗
- RR 4.6.0 released · 2026-04-24
- 1.1.32025-04-13 · diff ↗
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 1.1.22024-04-13 · diff ↗
- 1.1.12023-09-23 · diff ↗
- RR 4.3.0 released · 2023-04-21
- 1.1.0
- 1.0.0
- 0.2.3
- 0.2.22022-10-19 · diff ↗
- 0.2.1
- 0.2.02022-09-20 · diff ↗
- 0.1.92022-08-29 · diff ↗
Show 11 earlier eventsHide 11 earlier events
Package metadata
- First published
- 2022-01-11
- Total releases
- 21 / 4 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 1.8 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("forestploter")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-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.