Forest plots in R

Welcome

This website is a small collection of forest plots made in R using the forestploter package. Details and documentation of the package can be found here (where the function get_wh is presented - this is useful for saving plots) or here.

Readers are advised to start walking through A simple forest plot before looking into the slightly more advanced examples.

The data used for these plots can be found here.

For completeness, the simple plot has been recreated (more or less) using ggplot2 and patchwork. This is done mostly to demonstrate that it is a possibility, and to highlight some challenges one might face using these otherwise magnificent packages.

The plots

The website provides the code necessary to construct the following plots. Please be advised that the chosen colors are not necessarily good, and the reader is encouraged to select colors in a sensible way. The default settings, with alternating grey/white colors for stripes and black dots and lines used in the forest plot, are perfectly fine to use.

A simple plot

A figure containing two forest plots

Several exposure groups, long format

Several exposure groups, wide format

The simple plot recreated using ggplot2 and patchwork




The site was built on 13 jun 2025 using R version 4.5.0 (2025-04-11 ucrt), and the following packages (version): forestploter (1.1.3), grid (4.5.0), data.table (1.17.0), dplyr (1.1.4), ggplot2 (3.5.2), and patchwork (1.3.0).