Install ggprism
masterYou can install the stable version of ggprism from CRAN or the development version from GitHub.
Install from CRAN
install.packages("ggprism")Install development version from GitHub
remotes::install_github("csdaw/ggprism")repository·master·Indexed 42 days ago
https://github.com/csdaw/ggprismAn R package providing themes, palettes, and functions to customize ggplot2 visualizations to match the aesthetic of GraphPad Prism. Features include theme_prism(), scale_color_prism(), scale_fill_prism(), and tools for statistical annotations like add_pvalue().
You can install the stable version of ggprism from CRAN or the development version from GitHub.
install.packages("ggprism")remotes::install_github("csdaw/ggprism")ggprism provides functions to give ggplot2 objects the 'GraphPad Prism' aesthetic. Key components include:
theme_prism() to apply the Prism-style theme.scale_color_prism() and scale_fill_prism() with various palette names (e.g., "floral") to apply Prism-inspired color schemes.guides(y = "prism_offset_minor") to customize axis guides.add_pvalue() to add p-value annotations to plots.library(ggplot2)
library(ggprism)
tg <- ToothGrowth
tg$dose <- as.factor(tg$dose)
base <- ggplot(tg, aes(x = dose, y = len)) +
geom_violin(aes(colour = dose, fill = dose), trim = FALSE) +
geom_boxplot(aes(fill = dose), width = 0.2, colour = "black") +
scale_y_continuous(limits = c(-5, 40))
p_vals <- tibble::tribble(
~group1, ~group2, ~p.adj, ~y.position,
"0.5", "1", 8.80e-14, 35,
"0.5", "2", 1.27e-7, 39
)
base +
scale_color_prism("floral") +
scale_fill_prism("floral") +
guides(y = "prism_offset_minor") +
theme_prism(base_size = 16) +
theme(legend.position = "none") +
add_pvalue(p_vals, label = "p = {p.adj}", tip.length = 0, label.size = 4)If you use ggprism in your publication, please cite it as follows:
APA Style: Charlotte Dawson (2025). ggprism: A ‘ggplot2’ Extension Inspired by ‘GraphPad Prism’. R package version 1.0.7. https://cran.r-project.org/package=ggprism doi: 10.5281/zenodo.4556067
BibTeX:
@Manual{
title = {ggprism: A 'ggplot2' Extension Inspired by 'GraphPad Prism'},
author = {Charlotte Dawson},
year = {2025},
note = {R package version 1.0.7},
url = {https://cran.r-project.org/package=ggprism},
doi = {10.5281/zenodo.4556067}
}