From f53c097b5080cdf8076c586226b20e1536ca95ac Mon Sep 17 00:00:00 2001 From: Firas Date: Tue, 4 Jun 2024 14:17:23 -0600 Subject: [PATCH] Calculate vmin and vmax globally for the cube in makeAnimation --- src/makeAnimation.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/makeAnimation.jl b/src/makeAnimation.jl index 0b396c7..302727f 100644 --- a/src/makeAnimation.jl +++ b/src/makeAnimation.jl @@ -9,6 +9,8 @@ function makeAnimation( framerate::Integer=30 ) + a, b = __calculate_pclip(A, pclip=pclip) + # Creating an observable that triggers a change in the figure after a change in its value obs = Observable(A[:, :, 1]) @@ -18,9 +20,9 @@ function makeAnimation( ax = Axis(fig[1,1], yreversed=true, xautolimitmargin=(0,0), yautolimitmargin=(0,0)) # Creating a plot based on observable obs. If obs[] changes the plot automatically changes - seisimageplot!(ax, obs, pclip=pclip, ox=ox, dx=dx, oy=0, dy=1) + seisimageplot!(ax, obs, pclip=pclip, ox=ox, dx=dx, oy=oy, dy=dy, vmin=a, vmax=b) - record(fig, filename, iterations; framerate=30) do it + record(fig, filename, iterations; framerate=framerate) do it # modifying the Observable variable to change the plot obs[] = A[:, :, it] end