Transparent panel and plot backgrounds so the page wallpaper shows through
glass cards. Use surface = "opaque" for a near-solid panel when dense
charts must stay readable. Requires ggplot2 (a Suggests dependency).
Usage
theme_glass(
preset = NULL,
base_size = 13,
input = NULL,
surface = c("clear", "opaque"),
...
)Arguments
- preset
"light"or"dark". WhenNULL, usesglass_resolved_preset().- base_size
Base font size passed to
ggplot2::theme_minimal().- input
Optional Shiny
input.- surface
"clear"or"opaque". Seeglass_plot_colors().- ...
Additional
ggplot2::theme()arguments.
Examples
if (requireNamespace("ggplot2", quietly = TRUE)) {
ggplot2::ggplot(mtcars, ggplot2::aes(wt, mpg)) +
ggplot2::geom_point() +
theme_glass("light")
}