MakieLayout.jl
MakieLayout.jl copied to clipboard
Fix zoom, part 1
First thing I did to try this package
import MakieLayout: LAxis, layoutscene
import MakieLayout
scene, layout = layoutscene(1, 1, 30, resolution = (1200, 1200))
layout[1,1] = LAxis(scene, title="hi")
scene
Owing to the refreshing responsiveness of the zooming and scrolling, I near immediately scrolled to troubleland, related to calculating ticks when the extents are infinity and/or the widths are near-zero. This PR doesn't fix all of the issues, and I'm not sure the best way to fix the remaining issues. Basically the tick functions need to be allowed to return some degenerate thing (e.g. [x, x] for some x, two repeated tick positions).
This PR includes some aesthetic changes too. I personally strongly prefer relying on broadcasting as much as possible, to reduce duplicated lines across dimensions (even for 2 dimensions). But I'll take those changes out if you prefer.
Thanks for this package!