How to use the information from ax.finallimits[]
to update my plot to a new range in x
and y
when I do zoom in or zoom out in my plot? The catch is that the number of samples needs to remain the same.
using GLMakie
fig = Figure(resolution =(600,400))
m = rand(10,10)
x = 1:10
y = 1:10
ax = Axis(fig[1,1])
heatmap!(ax, x, y, m)
lim = ax.finallimits[]
fig
so that when I zoom in, let’s say now my limits are from 2 to 4 in x and 3 to 6 in y but I still want 10 numbers in those intervals.