I have a simple GeoAxis contourf animation, that iterates over time.
The problem is that at each update of the record function, the color range changes, which can be seen as the colorbar changes ticks constantly. I would like the color range to be absolute over all timesteps
Here is my code (using GLMakie, GeoMakie)
total_crange = colorLims #the extrema over all data field = structFun #This is the data with the third dimension as time field = permutedims(field,(2,1,3)) colorRange = repeat([0 1],size(field,3),2) # I repeat the colorRange N times points = (lonMsa, latMsa) idx = Observable(1) data = lift(idx) do i field[ :, :, i] end titlestr = lift(x -> "scale(hours) = "*string(x), idx) colorRange2 = lift(idx) do i colorRange[i,:] end fig = Figure(resolution = (2560 , 1440)) ga = GeoAxis( fig[1, 1], coastlines = true, dest = "+proj=eqc", lonlims = lonLim, latlims = latLim, title = titlestr) sp = contourf!(ga, lons, lats, data ; shading=false, colormap=:inferno, colorrange=colorRange2) scatter!(ga , points , color="white" , markersize=20) cb = Colorbar(fig[1, 2],sp) record(fig, imgName, 1:size(field, 3); framerate = 30) do i idx = i end