diff --git a/swash/processing/post.py b/swash/processing/post.py index 502d0f4..1638aef 100644 --- a/swash/processing/post.py +++ b/swash/processing/post.py @@ -76,7 +76,7 @@ ax_r.grid() fig_x, ax_x = plt.subplots() ax_x.plot(-data["botl"], color="k") -ax_x.plot(data["dep"][t == t0, :] - data["botl"]) +ax_x.plot(data["dep"][np.argmin(np.abs(t - t0)), :] - data["botl"]) ax_x.axvline(x0, c="k", alpha=0.2) ax_x.set(xlabel="x (m)", ylabel="z (m)") ax_x.autoscale(axis="x", tight=True)