Time Series Plots Using ggplot2
Plot multiple time series data
Set date axis limits
Key R function: scale_x_date()
# Base plot with date axis p <- ggplot(data = economics, aes(x = date, y = psavert)) + geom_line(color = "#00AFBB", size = 1) p # Set axis limits c(min, max) min <- as.Date("2002-1-1") max <- NA p + scale_x_date(limits = c(min, max))