-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
The majorTicksHelper function generates an ugly near zero number if zero is in the middle of the interval:
map floatShow $ linearMajorTicks 6 (-1, 1)
[-1.2,-0.9,-0.6,-0.3,1.110223e-16,0.3,0.6,0.9,1.2]
It looks like R deals with this by arbitrarily cutting off at 1e-14 (https://github.com/wch/r-source/blob/trunk/src/library/base/R/pretty.R#L35). I think doing integer arithmetic for the range and then converting back to Double is a better way. (which also means we can get rid of the hacky floatShow function.
Metadata
Metadata
Assignees
Labels
No labels