How can I change the aspect ration of an LScene
?
Previously, I, following the suggestion from Makie aspect ratio 3D plot, used the scale!
function:
import GLMakie as mak
x = y = range(-10, 10, 101)
z = range(-5, 5, 101)
F = [exp(-(xi^2 + yi^2 + zi^2) / 2^2) for xi=x, yi=y, zi=z]
xr, yr, zr = (x[1],x[end]), (y[1],y[end]), (z[1],z[end])
scale = (1, 1, 2)
fig = mak.Figure()
ax = mak.LScene(fig[1,1])
mak.scale!(ax.scene, scale)
mak.volume!(ax, xr, yr, zr, F)
mak.display(fig)
However, after the recent Makie update, it does not work anymore. The two figures below show the result obtained with scale = (1, 1, 1)
(top) and scale = (1, 1, 2)
(bottom).
As you can see, now the scaling changes the axes instead of changing the aspect ratio.