This ggplot2 theme is based on ggplot2::theme_minimal(). It controls the non-data related characteristics of a plot (e.g., the font type). On top of that, the font size, the major and minor grid lines, axis lines, axis ticks and the axis label positions can be specified.

theme_stat(
  base_size = 11,
  axis.label.pos = "top",
  axis.lines = "x",
  ticks = "x",
  major.grid.lines = "y",
  minor.grid.lines = "none",
  map = FALSE
)

Arguments

base_size

base font size, given in pts.

axis.label.pos

position of x and y-axis labels, can be set to "top", "center", or "bottom".

axis.lines

presence of axis lines, can be set to "x", "y", "both", or "none".

ticks

presence of axis ticks, can be set to "x", "y", "both", or "none".

major.grid.lines

presence of major grid lines, can be set to "x", "y", "both", or "none".

minor.grid.lines

presence of minor grid line<s, can be set to "x", "y", "both", or "none".

map

whether the theme should be optimized for maps, can be set to TRUE or FALSE.

Details

To use this theme in a R Markdown generated PDF document, insert `dev="cairo_pdf"` into `knitr::opts_chunk$set()`.

Examples

# \donttest{
if (FALSE) {
library(ggplot2)
library(statR)

ggplot(mpg, aes(class)) +
geom_bar() +
theme_stat() +
labs(title = "Title")
}# }