PlotUtils.jl
PlotUtils.jl copied to clipboard
Generic helper algorithms for building plotting components
Had some use for these when making colormaps out of `PerceptualColourMaps.jl` which has quite a lot of dependencies, so I needed to serialize them somehow.
While testing for https://github.com/MakieOrg/Makie.jl/pull/3681 I noticed that tick finding has problems with small numbers, starting around `PlotUtils.optimize_ticks(1e-17, 10e-17)`. It would be nice if we could push this a bit further....
On master: ```julia @btime PlotUtils.postdecimal_digits(1.245) 16.186 μs (0 allocations: 0 bytes) 3 ``` This PR: ```julia @btime PlotUtils.postdecimal_digits(1.245) 21.035 ns (0 allocations: 0 bytes) 3 ``` Not sure yet, that...
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...
I have some OHLC data [here](https://pastebin.com/T1v4RaXz) which I'm trying to plot and manipulate in a Jupyter notebook using the IJulia kernel. The following code reliably crashes the kernel, but shows...
I've accidentally been using `Base.convert` method from this package that converts `Unsigned` to `RGB`. This is type-unstable (which is easy to fix) but it also looks like type piracy, so...