Defines the ggplot theme with the default R colors.
theme_mediocre.RdDefines the ggplot theme with the default R colors.
Usage
theme_mediocre(
  pal = "autumn",
  gradient = NULL,
  background = FALSE,
  base_size = if (.Platform$OS.type == "windows") 17 else 14,
  base_family = "Lato",
  base_line_size = base_size/50,
  base_rect_size = base_size/170
)
theme_mediocre_map(
  pal = "autumn",
  gradient = NULL,
  background = FALSE,
  base_size = if (.Platform$OS.type == "windows") 17 else 14,
  base_family = "Lato",
  base_line_size = base_size/50,
  base_rect_size = base_size/170
)Arguments
- pal
 a string. Defines the color palette selected. Can either be either "autumn", "rainbow", "green", "hotcold", "blackandwhite", "coty", "leo", "portal" or "pem"
- gradient
 a string, either "left" or "right". Turns divergent palettes into gradient ones by splitting it in two. If equal to "right", the gradient palette is built with the right hand side part of the divergent palette. If equal to "left", uses the left hand side but flipping so that light values are on the left.
- background
 If TRUE, a background is added to the plots
- base_size
 Base font size, given in pts.
- base_family
 Base font family
- base_line_size
 Base size for line elements
- base_rect_size
 Base size for rect elements
Examples
ggplot(ggplot2::mpg, aes(x = cty, y = displ, fill = manufacturer)) +
  geom_col() +
  theme_mediocre() +
  labs(title = "A very nice title", subtitle = "A disappointing subtitle")
#> Warning: restarting interrupted promise evaluation
#> Warning: internal error 1 in R_decompress1 with libdeflate
#> Error: lazy-load database '/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/mediocrethemes/R/mediocrethemes.rdb' is corrupt
ggplot(ggplot2::mpg, aes(x = cty, y = displ, color = hwy)) +
  geom_point() +
  theme_mediocre() +
  labs(title = "A very nice title", subtitle = "A disappointing subtitle")
#> Warning: restarting interrupted promise evaluation
#> Warning: internal error 1 in R_decompress1 with libdeflate
#> Error: lazy-load database '/Library/Frameworks/R.framework/Versions/4.5-arm64/Resources/library/mediocrethemes/R/mediocrethemes.rdb' is corrupt