Experimental.
A complete ggplot2 theme (transparent plot/panel backgrounds, tokenised
grid and text colors) so plots sit correctly on any shadshiny surface. Pair
with shad_scale_color_shad() / shad_scale_fill_shad() for the categorical
palette. Requires ggplot2.
Usage
shad_theme_ggplot2(preset = NULL, dark = FALSE, base_size = 14)
shad_scale_color_shad(preset = NULL, dark = FALSE, ...)
shad_scale_fill_shad(preset = NULL, dark = FALSE, ...)Arguments
- preset
A theme preset name, or a
shad_current_theme()list (itspreset/darkare used).- dark
If
TRUE, use dark-mode token colors.- base_size
Base font size.
- ...
Passed to the underlying ggplot2 scale.
See also
Other shadshiny theming:
shad_chart_colors(),
shad_current_theme(),
shad_theme(),
shad_theme_echarts4r(),
shad_theme_from_registry(),
shad_theme_plotly(),
shad_theme_scope(),
shad_tokens()
Examples
if (interactive() && requireNamespace("ggplot2", quietly = TRUE)) {
library(ggplot2)
ggplot(mtcars, aes(wt, mpg)) + geom_point() + shad_theme_ggplot2()
}