Tom94 / tev

High dynamic range (HDR) image viewer for graphics people
BSD 3-Clause "New" or "Revised" License
1.08k stars 86 forks source link

Use scientific notation in MultiGraph #214

Closed iRath96 closed 9 months ago

iRath96 commented 9 months ago

Hi, first of all thanks for this great image viewer!

Currently the MultiGraph uses %.3f format to show minimum/mean/maximum, which can be problematic when the image values are small (most notably when comparing error between similar images). This PR changes the format to %.2e, which retains the same precision as before, but includes the exponent.

Thanks!

Tom94 commented 9 months ago

Hi Alex, likewise thanks for the contribution!

I think numbers in the range 0.01 <= abs(x) < 1000 are better recognized (and compared with each other) using the existing 3 decimals. It's also what current tev users are used to.

To maintain compatibility with those, could you change it so that formatting only switches over to scientific outside of that range? I'd also appreciate a special case for x == 0 that maintains the existing format. Thanks!