chillibasket / processing-grapher

Terminal and graphing program for analysis and recording of data from serial devices
GNU General Public License v3.0
35 stars 17 forks source link

X- and Y- axis labels sometimes do not show enough significant digits #11

Closed chillibasket closed 3 years ago

chillibasket commented 3 years ago

On the live graph and file graph, the x- and y- axis labels sometimes don't show enough significant digits. This causes multiple labels to show the same number. The "calculateRequiredPrecision" in the Graph class needs to be improved to deal with these edge cases.

chillibasket commented 3 years ago

The issue only seems to occur when the maximum axis value is positive and the minimum axis value is negative and less than 1. In this case the formula used to calculate the number of significant digits to display is off by 1 digit. I haven't found any satisfactory solution yet but will continue to look into it.