Learn R Programming

schtools (version 0.4.1)

theme_lucas: Sarah's go-to theme for ggplot2

Description

Requires the hrbrthemes package and the PT Sans and PT Sans Narrow fonts from Google Fonts.

Usage

theme_lucas()

Arguments

Value

list of ggproto objects

Author

Sarah Lucas salucas@umich.edu

Examples

Run this code
library(ggplot2)
library(showtext)

# run once to download the PT Sans fonts
font_add_google(name = "PT Sans", family = "PT Sans")
font_add_google(name = "PT Sans Narrow", family = "PT Sans Narrow")
showtext_auto()

# make a plot with theme_lucas()
ggplot(mtcars) +
  aes(x = mpg, y = wt, color = cyl) +
  geom_point() +
  theme_lucas()

Run the code above in your browser using DataLab