A large-font theme with a black panel background and white text, suited
to dark-mode PowerPoint slides. This is the default hvtiPlotR PPT theme —
hv_theme_ppt() and theme_ppt() are aliases for this function.
For a light-background variant use hv_theme_light_ppt().
Removes grid lines and panel borders.
Usage
hv_theme_dark_ppt(
base_size = 32,
base_family = "",
header_family = NULL,
base_line_size = base_size/22,
base_rect_size = base_size/22,
ink = "white",
paper = "transparent",
accent = "#3366FF"
)
theme_dark_ppt(
base_size = 32,
base_family = "",
header_family = NULL,
base_line_size = base_size/22,
base_rect_size = base_size/22,
ink = "white",
paper = "transparent",
accent = "#3366FF"
)
theme_ppt(
base_size = 32,
base_family = "",
header_family = NULL,
base_line_size = base_size/22,
base_rect_size = base_size/22,
ink = "white",
paper = "transparent",
accent = "#3366FF"
)
hv_theme_ppt(
base_size = 32,
base_family = "",
header_family = NULL,
base_line_size = base_size/22,
base_rect_size = base_size/22,
ink = "white",
paper = "transparent",
accent = "#3366FF"
)Arguments
- base_size
Base font size in points. Default
32.- base_family
Base font family. Default
""(device default).- header_family
Font family for headers, or
NULLto inheritbase_family. DefaultNULL.- base_line_size
Line size used for axis lines and borders. Default
base_size / 22.- base_rect_size
Rectangle border size. Default
base_size / 22.- ink
Foreground (text and line) colour. Default
"white".- paper
Background colour. Default
"transparent".- accent
Accent colour used by some
theme_grey()elements. Default"#3366FF".
Value
A ggplot2::theme() object.
Examples
library(ggplot2)
p <- ggplot(mtcars, aes(wt, mpg, colour = factor(cyl))) + geom_point()
# Dark PPT theme — large font, white text, black panel
p + hv_theme_dark_ppt()
# Via alias
p + theme_ppt()
if (FALSE) { # \dontrun{
# Best viewed against a dark slide background
p + hv_theme_dark_ppt() +
ggplot2::theme(plot.background = ggplot2::element_rect(fill = "navy"))
} # }