I’m slowly getting used to Makie and the animations workflow. I am currently trying to make an animation of a 2D surface plot (quite similar to the use case here. I learned that my workflow was slow because I was constantly making new scenes and should use
Observables. Now, I have a question on how to properly incorporate
Observables into my particular workflow.
For this particular plotting workflow, I have to plot sections ( maybe 1/4 of the whole plot at a time, for example) due to how the data are arranged. For an individual plot, I may do something like this:
ax = Axis( fig ) for i in 1:N surface!( x[i,1,:,:], y[i,1,:,:], q[i,1,:,:], shading=false, colormap = cmap, colorrange = (qmin, qmax) ) end Colorbar( fig[1,2], ... )
y, and the quantity
q are 4 dimensional, with the last two containing the interesting stuff and the first dimension being a discretization index. (in practice I can do away with index 2 if it makes the solution easier). Then I would, in theory, update the data in the surface scene to make an animation.
My question becomes: How do I adapt this workflow to use
Observables when I am slicing & iterating on the data? I assume that there is some solution with