An R package that extends ggplot2 to create publication-ready graphics with statistical details embedded directly in the plots.
ggstatsplot is an R package that enhances ggplot2 visualizations by embedding comprehensive statistical analysis details directly into the plots. It solves the problem of disjointed data exploration workflows by combining visualization and statistical testing into a single, information-rich graphical output. The package supports a wide range of statistical tests including parametric, non-parametric, robust, and Bayesian approaches.
Data scientists, researchers, and statisticians using R for exploratory data analysis who need to create publication-ready visualizations with integrated statistical reporting. It's particularly valuable for academic researchers and analysts who regularly produce statistical graphics for papers or reports.
Developers choose ggstatsplot because it dramatically reduces the code needed to create statistically detailed plots, ensures consistent reporting standards, and eliminates the need to manually copy-paste results between analysis and visualization tools. Its unique selling point is the seamless integration of multiple statistical frameworks within a familiar ggplot2 syntax.
Enhancing {ggplot2} plots with statistical analysis 📊📣
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically embeds detailed test results—including effect sizes, confidence intervals, and Bayesian estimates—directly into plots using gold-standard reporting formats, as demonstrated in the Yuen's test example in the README.
Allows seamless toggling between parametric, non-parametric, robust, and Bayesian statistical approaches within the same plotting functions, catering to diverse research methodologies without switching packages.
Provides grouped_ variants of all primary functions to easily repeat analyses across a single grouping variable, significantly reducing code duplication in exploratory workflows, as shown with grouped_ggbetweenstats().
Includes utilities like extract_subtitle() and extract_stats() to retrieve statistical details as data frames or expressions for use in custom plots or further processing, enhancing reproducibility and flexibility.
Default plots are information-dense and can be overwhelming for effective communication in talks or brief reports, a limitation the README explicitly acknowledges in its 'Misconceptions' section.
Requires substantial ggplot2 expertise for meaningful customization beyond defaults, steepening the learning curve for R beginners or those unfamiliar with the grammar of graphics.
Built-in functions have predefined layouts and aesthetics; while extract functions enable custom plots, significant tweaking is needed for non-standard designs, which can be cumbersome.
ggstatsplot is an open-source alternative to the following products: