Define types plotter.XY and plotter.XYZ for append
Created by: chmike
What are you trying to do?
Creating a plotter.XYs value by appending its points with append
because the total number of points is unknown when I start.
What did you do?
points := make(plotter.XYs, 0, 1024)
for {
...
points = append(points, struct{ X, Y float64 }{x, y})
}
What did you expect to happen?
I expect I could write the following which is more readable and intuitive.
points = append(points, plotter.XY{x, y})
What version of Go and Gonum/plot are you using?
Current
Does this issue reproduce with the current master?
Yes