gonum / plot

A repository for plotting and visualizing data
BSD 3-Clause "New" or "Revised" License
2.72k stars 202 forks source link

Fix off by one indexing bug in plotutil.MedianAndMinMax #748

Closed skiesel closed 2 years ago

skiesel commented 2 years ago

Fix off by one indexing bug in plotutil.MedianAndMinMax when determining the mean of the two inner-most elements in the slice.

Please take a look.

codecov-commenter commented 2 years ago

Codecov Report

Merging #748 (471ac2b) into master (18129d8) will decrease coverage by 0.08%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #748      +/-   ##
==========================================
- Coverage   73.32%   73.23%   -0.09%     
==========================================
  Files          56       58       +2     
  Lines        5154     5366     +212     
==========================================
+ Hits         3779     3930     +151     
- Misses       1191     1243      +52     
- Partials      184      193       +9     
Impacted Files Coverage Δ
plotutil/errorpoints.go 0.00% <0.00%> (ø)
vg/vggio/vggio.go 67.37% <0.00%> (ø)
vg/vggio/context.go 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 18129d8...471ac2b. Read the comment docs.

kortschak commented 2 years ago

Thank you. Would you please open a PR at gonum/gonum with the commit message "A+C: add Scott Kiesel" adding your details to the AUTHORS and CONTRIBUTORS files. When you have done that I'll approve and merge.