Closed chmike closed 5 years ago
Creating a plotter.XYs value by appending its points with append because the total number of points is unknown when I start.
append
points := make(plotter.XYs, 0, 1024) for { ... points = append(points, struct{ X, Y float64 }{x, y}) }
I expect I could write the following which is more readable and intuitive.
points = append(points, plotter.XY{x, y})
Current
Yes
This seems like a reasonable expectation.
@chmike do you want to give this a stab and send your first PR against the Gonum repo? :)
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?
What did you expect to happen?
I expect I could write the following which is more readable and intuitive.
What version of Go and Gonum/plot are you using?
Current
Does this issue reproduce with the current master?
Yes