correct indexing for timeseries off by 1 in plot using statement