PlotUtils.jl
PlotUtils.jl copied to clipboard
More optimize_ticks improvements
Following https://github.com/JuliaPlots/PlotUtils.jl/pull/83#issuecomment-621382134, I realized that actual floating point are not really used during the optimization, so most FP calculations can be avoided. Representing the ticks as a new Ticks
type and calculating FP values only on getindex
makes things both simpler and faster.
Also, unitful quantities work now.
This makes two tests fail. Specifically, optimize_ticks(1.0,1.0+eps())
and optimize_ticks(1.0-eps(),1.0)
, so I marked them as broken. These do issue a warning and the result is sensible, so I think it's fine.
I rebased and formatted this PR just to better see the difference to the current version. It would still be neccessary to check whether the algorithms are doing what they shoud do.
Is this really rebased ? It looks like it reverts recent additions (especially https://github.com/JuliaPlots/PlotUtils.jl/pull/136 which is critical).
Is this really rebased ? It looks like it reverts recent additions (especially #136 which is critical).
Well, when in doubt, I kept the original version, so there is certainly stuff that'd need to be adapted.
I think this is as far as I can help here.