depictr: A unified toolkit for visualising statistical models and data

Package Web application Open Materials

Abstract

Twin R and Python packages for producing consistent, publication-ready statistical graphics from exploratory analysis to model estimates, diagnostics, uncertainty and power. The toolkit includes colourblind-aware palettes and measurable accessibility checks.

Overview

depictr (Bernabeu, 2026a, 2026b) provides a shared visual language for exploratory graphics, model estimates, diagnostics, uncertainty and power analyses. Its R and Python implementations use the same naming and colour conventions, and both return ordinary plot objects that can still be adapted to the needs of a study. The accessibility audit examines the rendered figure itself, since a colourblind-aware palette alone cannot guarantee an accessible figure.

The Python implementation also has a Streamlit app, which offers a gallery of the plots and a way to try the package without writing any code. It runs locally from a clone of the Python repository, as the app guide explains.

One Set of Conventions, Audited at the End

Colour, interval and labelling conventions carry from the observed distribution of a simulated lexical-decision experiment, through the model estimates, to the figure that will leave the project. Figure 1 shows the observed distributions, Figure 2 the model estimates drawn from the same data, and Figure 3 the version that the accessibility audit asked for.

Empirical cumulative distributions of lexical-decision reaction times for related and unrelated primes, with quartile guides
Observed Reaction-Time Distributions With Directly Readable Quartiles.
Forest plot of the fixed effects, each per standard deviation of its predictor, for priming condition, presentation modality and word frequency, with 95% confidence intervals
Fixed Effects in Milliseconds per Standard Deviation of the Predictor, With 95% Confidence Intervals.
Corrected density curves of lexical-decision reaction times, distinguished by colour and line type
The Corrected Figure, in Which Colour and Line Type Both Separate the Priming Conditions.

Reproducibility and Accessibility

The recommended workflow is to keep the plotting code with the analysis, record the package version and run the audit on the exact figure that will be submitted or presented. Alt text and a meaningful caption remain part of the author's editorial responsibility. See the R documentation, Python documentation and companion blog post for runnable examples.

References

Bernabeu, P. (2026a). depictr: A unified, colourblind-safe toolkit for publication-ready statistical visualisation (Version 0.3.0) [Computer software]. PyPI. https://pypi.org/project/depictr/0.3.0/

Bernabeu, P. (2026b). depictr: A unified toolkit for visualising statistical models and data (Version 0.3.0) [Computer software]. Comprehensive R Archive Network (CRAN). https://doi.org/10.32614/CRAN.package.depictr

Documentation

R documentation Python documentation

Comments are provided by Disqus and are not loaded automatically. Loading them connects your browser to Disqus, which may use cookies and process data under its privacy policy. See this site's privacy notice for details.