Feel to reject this PR if I got the wrong Idea here, but this fixed one of my bugs.
To find PreviousHeight, plot.go looks at line[1] as a value, but this causes a crash if the line has only one value.
I suspect to find the previous height, we want to look at line[i-1]. I added this and a simple check to make sure we aren't on the first data point, in which case there is no "PreviousHeight".
Feel to reject this PR if I got the wrong Idea here, but this fixed one of my bugs. To find
PreviousHeight
,plot.go
looks atline[1]
as a value, but this causes a crash if the line has only one value.I suspect to find the previous height, we want to look at
line[i-1]
. I added this and a simple check to make sure we aren't on the first data point, in which case there is no "PreviousHeight".