Learn R Programming

wsjplot (version 0.1.0)

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

Description

Make timeseries graphs look like the the Wall Street Journal

Usage

theme_wsj()

Arguments

Examples

Run this code
# NOT RUN {
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 = ""
  )

# }

Run the code above in your browser using DataLab