Make a time series line plot of the variables in the given data frame, in a single plot area. The number of variables in the data frame should be between 1 and 7

ggplot_ecodata_ts(
  data,
  variables = NULL,
  title = "",
  color = NULL,
  ylab = NULL,
  title_strlen = 60,
  variable_strlen = 85,
  plot.recessions = FALSE
)

Arguments

data

Data frame from `get_ecodata()` that includes a variable called `Date` and the other variables to plot

variables

Optional, vector of strings that includes the economic variables to plot. If not specified, the function will plot all the variables given in `data`, if possible.

title

Optional, string for the title of the plot. Default is ""

color

Optional, string or vector of strings for the color of the lines. Default is to use the ecodata color scale. Should either be a single color or a vector of colors with the same length as the number of variables to plot.

ylab

Optional, string for the y-axis label. Default is the units of the meta data for the variables to be plotted

title_strlen

Optional, word-wrap the length of the title by this many characters. Default = 60.

variable_strlen

Optional, word-wrap the length of the variable names by this many characters. Default = 85.

plot.recessions

Optional, logical for whether or not show show NBER recession bars in the plot