November 2018
Beginner to intermediate
348 pages
8h 32m
English
Now that we've finished with getting the file and parsing it, let's plot the data. Again, as in Chapter 2, Linear Regression-House Price Prediction,we will be using Gonum's excellent plotting library. This time around, we're going to be exploring more of it in detail. We'll learn the following:
We'll start by writing a function to plot a time series:
func newTSPlot(xs []time.Time, ys []float64, seriesName string) *plot.Plot { p, err := plot.New() dieIfErr(err) xys := make(plotter.XYs, len(ys)) for i := range ys { xys[i].X = float64(xs[i].Unix()) ...Read now
Unlock full access