From 858928353a2dfca5dceef5d982216dadc3cb1326 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Wed, 30 Mar 2022 12:16:19 +0200 Subject: [PATCH] Add support for arbitrary number of layers --- swash/processing/layers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swash/processing/layers.py b/swash/processing/layers.py index 7b7fac1..f1090ee 100644 --- a/swash/processing/layers.py +++ b/swash/processing/layers.py @@ -55,7 +55,7 @@ vk = np.sqrt((velk[n] ** 2).sum(axis=1)) lines = ax.plot(x, zk[n].T, c="#0066cc") quiv = [] -for i in range(10): +for i in range(len(lines)-1): quiv.append( ax.quiver( x[::50], @@ -87,4 +87,4 @@ ani = animation.FuncAnimation( fig, animate, frames=wl[:, 0].size, interval=20, blit=True ) -ani.save(out.joinpath("layers.mp4", codec="h265")) +ani.save(out.joinpath("layers.mp4"))