Software
Placeholder

vdiffr

Visual regression testing and graphical diffing with testthat

C++

vdiffr is a testthat extension for R that monitors the visual appearance of plots by generating reproducible SVG files and tracking them as snapshots. It helps developers test that their plotting code produces consistent visual output across code changes and environments.

The package works by comparing current plot output against saved baseline snapshots, making it valuable for catching unintended visual regressions in plotting code. It handles both base R graphics and ggplot2 plots, and includes a review workflow for approving legitimate changes to plot appearance. The package is designed to avoid false failures on CRAN by only flagging visual differences in local development and CI environments where they can be properly reviewed.

Contributors