theme_darklightmix: a ggplot theme with a mixture of dark and light backgrounds

Description Usage Arguments Examples

View source: R/ggplot_themes.R

Description

A theme based on ggplot theme_minimal. Uses default R colors for plot background

Usage

1
2
3
4
5
theme_darklightmix(
  font_size = 10,
  legend_position = "right",
  color_theme = "light"
)

Arguments

font_size

Base font size

legend_position

the position of legends ("none", "left", "right", "bottom", "top", or two-element numeric vector)

color_theme

Choose from a combination of light and dark themes ("va_light","va_dark","light","lightcyan","cornsilk","antiquewhite","darkslategray","gray25","turquoise4","steelblue")

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
for(i in c("va_light","va_dark"
,"light","lightcyan","cornsilk","antiquewhite"
,"darkslategray","gray25","turquoise4","steelblue")){
print(
 iris %>%
    ggplot(aes(x=Sepal.Length,y=Sepal.Width,color=factor(paste("Petal",round(Petal.Length,0))))) +
      geom_point() +
      labs(x="Sepal Length", y="Sepal Width",
        title="Petals and Sepals",ro
          subtitle="Plot shows the sizes of petals and sepals",
          caption=i,
          color = "Legend") +
          facet_wrap(~Species,scales = "free") +
          theme_darklightmix(color_theme = i) +
          scale_color_brewer(type="qual",palette = "Set3")  )
          }

amit-agni/cutlery documentation built on Dec. 31, 2019, 2:09 p.m.