Modified ggprism theme which restores the legend title.
theme_ggprism_mod(
palette = "black_and_white",
base_size = 14,
base_family = "sans",
base_fontface = "bold",
base_line_size = base_size/20,
base_rect_size = base_size/20,
axis_text_angle = 0,
border = FALSE
)string. Palette name, use
names(ggprism_data$themes) to show all valid palette names.
numeric. Base font size, given in "pt".
string. Base font family, default is "sans".
string. Base font face, default is "bold".
numeric. Base linewidth for line elements
numeric. Base linewidth for rect elements
integer. Angle of axis text in degrees.
One of: 0, 45, 90, 270.
logical. Should a border be drawn around the plot?
Clipping will occur unless e.g. coord_cartesian(clip = "off") is used.
Returns a list-like object of class theme.
theme is a modified version of theme_prism from ggprism package https://github.com/csdaw/ggprism
(License: GPL-3). Param text is from ggprism:theme_prism() documentation theme_prism.
Theme adaptation based on ggprism vignette
https://csdaw.github.io/ggprism/articles/themes.html#make-your-own-ggprism-theme-1.
# Generate a plot and customize theme
library(ggplot2)
df <- data.frame(x = rnorm(n = 100, mean = 20, sd = 2), y = rbinom(n = 100, size = 100, prob = 0.2))
p <- ggplot(data = df, mapping = aes(x = x, y = y)) + geom_point(mapping = aes(color = 'red'))
p + theme_ggprism_mod()