Time Series Plots Using ggplot2

Of course, the ggplot2 can also visualize time series. This section introduces the relevant ggplot2 syntax.

Plot multiple time series data

Add trend smoothed line

Key function: stat_smooth()

p + stat_smooth(
  color = "#FC4E07", fill = "#FC4E07",
  method = "loess"
  )