theme_wsj: Make timeseries graphs look like the the Wall Street Journal

Description Usage Examples

View source: R/theme_wsj.R

Description

Make timeseries graphs look like the the Wall Street Journal

Usage

1

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
library(ggplot2)
`%>%` <- magrittr::`%>%`

plt <- economics_long %>%
  dplyr::filter(variable %in% c("psavert", "uempmed")) %>%
  ggplot(aes(date, value, color = variable)) +
  geom_line() +
  scale_y_continuous(
      labels = label_wsj(suffix = " M")
  ) +
  scale_color_discrete(
      labels = c("Series 1", "Series 2")
  ) +
  theme_wsj() +
  labs(
    title = "Some Economics Plot",
    caption = "Source: Top secret.",
    y = ""
  )

slee981/wsjplot documentation built on March 20, 2021, 3:09 p.m.