theme_oscuro: Dark (oscuro) theme for ggplots

View source: R/theme_oscuro.R

theme_oscuroR Documentation

Dark (oscuro) theme for ggplots

Description

This function will make an extra dark theme for ggplots. Useful for PowerPoints with black background.

Usage

theme_oscuro(base_size = 12, base_family = "")

Examples

mtcars2 <- within(mtcars, {
vs <- factor(vs, labels = c("V-shaped", "Straight"))
am <- factor(am, labels = c("Automatic", "Manual"))
cyl  <- factor(cyl)
gear <- factor(gear)})

p1 <- ggplot(mtcars2) +
  geom_point(aes(x = wt, y = mpg, colour = gear)) +
  labs(title = "Fuel economy declines as weight increases",
       subtitle = "(1973-74)",
       caption = "Data from the 1974 Motor Trend US magazine.",
       x = "Weight (1000 lbs)",
       y = "Fuel economy (mpg)",
       colour = "Gears")

p1 + theme_oscuro()

chavezlab/csnl documentation built on June 12, 2022, 10:09 a.m.