A major theme in this chapter other than time series analysis is plotting. You may have also noticed a few new functions in the main function earlier. Now it's time to revisit them.
We start with the output of stl.Decompose. This is the definition:
type Result struct { Data []float64 Trend []float64 Seasonal []float64 Resid []float64 Err error}
We've already defined newTSPlot previously, which works fine for the data, trend, and seasonal, but not the residuals. The reason why we don't want to plot residuals as a line chart is because if done right, ...