Any ideas? This strikes me as elementary. I expected there to be functions like xlims() to complement xlims!(xmin, xmax) like in Plots.jl.
The reason I’m wanting to do this is to plot some infinite lines of the form ax + by + cz = 0. I’m doing this by finding two points on either side of the view limits and connecting them with a line segment.
I think this only works for LScene axis types, not Axis3, and it assumes that the plot at index 1 is the <:Combined{Makie.axis3d} which carries view limits data. Not sure if this can be relied on.
f, a, p = scatter(rand(Point2f, 10))
a.finallimits[]
For LScene (or Scene) limits/bounding boxes aren’t kept around anymore, but you can grab eyeposition, lookat and upvector from the camera:
f, a, p = scatter(rand(Point3f, 10))
Makie.camera_controls(p).eyeposition
Alternatively you can copy this to get the bounding box the camera uses as a base Makie.jl/scenes.jl at 156e651ffd1b20eed3f511f925c1e8ac4eed1474 · MakieOrg/Makie.jl · GitHub. (Use Makie.parent_scene(p) or a.blockscene.children[1] as the scene here.) This is the combined bounding box of plots though, which might be quite different from your current view (due to zooming and translation).