From 371acdf9d13ebe8957dab7e4966482a2750f796b Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Mon, 7 Mar 2022 12:30:50 +0100 Subject: [PATCH] Changed styling --- swash/processing/post.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/swash/processing/post.py b/swash/processing/post.py index 8a1ea30..fbe32ff 100644 --- a/swash/processing/post.py +++ b/swash/processing/post.py @@ -55,13 +55,13 @@ R = np.sqrt( log.info("Plotting results") fig, (ax_watl, ax_vel) = plt.subplots(2) -ax_watl.plot(t, data["watl"][:, arg_x0], label="watl") +ax_watl.plot(t, data["watl"][:, arg_x0], lw=1, label="watl") ax_watl.set(xlabel="t (s)", ylabel="z (m)") ax_watl.autoscale(axis="x", tight=True) ax_watl.grid() ax_watl.axvline(t0, c="k", alpha=0.2) -ax_vel.plot(t, data["vel"][:, 0, arg_x0], label="vel") +ax_vel.plot(t, data["vel"][:, 0, arg_x0], lw=1, label="vel") ax_vel.set(xlabel="t (s)", ylabel="U (m/s)") ax_vel.autoscale(axis="x", tight=True) ax_vel.grid() @@ -77,7 +77,7 @@ ax_fft.plot( lw=1, c="k", alpha=0.2, - label="PSD", + label="PSD ($\\eta$)", ) ax_r.plot(phi_eta[0], R, marker="+", label="R") ax_r.set(xlim=(0, 0.3), ylim=(0, 1), xlabel="f (Hz)", ylabel="R") @@ -87,7 +87,7 @@ ax_r.legend(loc="upper left") ax_fft.legend(loc="upper right") fig_r.tight_layout() -fig_x, ax_x = plt.subplots() +fig_x, ax_x = plt.subplots(figsize=(10, 1)) ax_x.plot(data["x"], -data["botl"], color="k") ax_x.fill_between( data["x"], @@ -97,6 +97,8 @@ ax_x.fill_between( 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) +ax_x.set(aspect="equal") +fig_x.tight_layout() out = pathlib.Path(config.get("post", "out")).joinpath(f"t{t0}x{x0}") log.info(f"Saving plots in '{out}'")