The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

WSJ Plot

Make ggplot graphs that look like the Wall Street Journal.

Quick Use

Install from CRAN

Coming soon…

Install from GitHub

 > devtools::install_github("slee981/wsjplot")

Make plot

 > library(ggplot2)
 > library(dplyr)
 > `%>%` <- magrittr::`%>%`

 > economics_long %>%
       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 = ""
       )

Functions

Contribute

  1. From your terminal:
$ git clone https://github.com/slee981/wsjplot.git
$ cd wsjplot 
  1. In RStudio:
 > library(devtools)
 > load_all()              # load exported functions into memory 
 > test()                  # run tests
 > document()              # update based on roxygen2 doc strings
 > check()                 # full diagnostic tests

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.