Select an rtemis theme
Usage
choose_theme(
x = c("white", "whitegrid", "whiteigrid", "black", "blackgrid", "blackigrid",
"darkgray", "darkgraygrid", "darkgrayigrid", "lightgraygrid", "mediumgraygrid"),
override = NULL
)Details
If x is not defined, choose_theme() will use getOption("rtemis_theme", "whitegrid") to
select the theme. This allows users to set a default theme for all rtemis plots by setting
options(rtemis_theme = "theme_name") at any point.
Examples
# Get default theme:
choose_theme()
#> <whitegrid Theme>
#> Showing first 12 of 48 items.
#> bg: <chr> #ffffff
#> plot_bg: <chr> transparent
#> fg: <chr> #000000
#> pch: <nmr> 16.00
#> cex: <nmr> 1.00
#> lwd: <nmr> 2.00
#> bty: <chr> n
#> box_col: <chr> #000000
#> box_alpha: <nmr> 1.00
#> box_lty: <nmr> 1.00
#> box_lwd: <nmr> 0.50
#> grid: <lgc> TRUE
#> ...36 more items not shown.
#>
# Get darkgraygrid theme. Same as `theme_darkgraygrid()`:
choose_theme("darkgraygrid")
#> <darkgraygrid Theme>
#> Showing first 12 of 48 items.
#> bg: <chr> #121212
#> plot_bg: <chr> transparent
#> fg: <chr> #ffffff
#> pch: <nmr> 16.00
#> cex: <nmr> 1.00
#> lwd: <nmr> 2.00
#> bty: <chr> n
#> box_col: <chr> #ffffff
#> box_alpha: <nmr> 1.00
#> box_lty: <nmr> 1.00
#> box_lwd: <nmr> 0.50
#> grid: <lgc> TRUE
#> ...36 more items not shown.
#>
# This will use the default theme, and override the foreground color to red:
choose_theme(override = list(fg = "#ff0000"))
#> <whitegrid Theme>
#> Showing first 12 of 48 items.
#> bg: <chr> #ffffff
#> plot_bg: <chr> transparent
#> fg: <chr> #ff0000
#> pch: <nmr> 16.00
#> cex: <nmr> 1.00
#> lwd: <nmr> 2.00
#> bty: <chr> n
#> box_col: <chr> #ff0000
#> box_alpha: <nmr> 1.00
#> box_lty: <nmr> 1.00
#> box_lwd: <nmr> 0.50
#> grid: <lgc> TRUE
#> ...36 more items not shown.
#>