Open GideonWolfe opened 4 years ago
When a plot only has one data point, the code will make it go out of bounds (at index one). Test this by going to the example and setting
p0.Data = [][]float64{[]float64{5}}
And it will crash.
Now it checks the ith element instead of one, and starts reading the data from 0 instead of 1.
i
0
1
Honestly I may need to look at this again... Every time I think I fixed it, it crashes again. Every single time it's just bad indexing in the plot function, I need to look closer.
When a plot only has one data point, the code will make it go out of bounds (at index one). Test this by going to the example and setting
And it will crash.
Now it checks the
i
th element instead of one, and starts reading the data from0
instead of1
.