Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ds_theme_set

dslabs theme set


Description

This function sets a ggplot2 theme used throughout the data science labs. It can be called without arguments.

Usage

ds_theme_set(
  new = "theme_bw",
  args = NULL,
  base_size = 11,
  bold_title = TRUE,
  ...
)

Arguments

new

a prebuilt ggplot2 theme. Defaults to "theme_minimal"

args

the arguments to be passed along to the ggplot2 theme function. Defaults to "NULL".

base_size

if "args" is "NULL", base_size is one of the arguments passed to the theme function. It defaults to 11.

bold_title

if TRUE, sets titles to be bold

...

additional arguments to be used by theme

Value

None

Examples

library(ggplot2)
ds_theme_set()
qplot(hp, mpg, data=mtcars, color=am, facets=gear~cyl, 
main="Scatterplots of MPG vs. Horsepower", 
xlab="Horsepower", ylab="Miles per Gallon")

dslabs

Data Science Labs

v0.7.4
Artistic-2.0
Authors
Rafael A. Irizarry, Amy Gill
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.