From a6d204166682c25c1556e818e0d23f2c61885595 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" Date: Tue, 3 May 2022 09:19:03 +0200 Subject: [PATCH] Plot input wave in olaflow in legible form --- olaflow/processing/sws_wavedict_paddle.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/olaflow/processing/sws_wavedict_paddle.py b/olaflow/processing/sws_wavedict_paddle.py index 607d314..2fd2374 100644 --- a/olaflow/processing/sws_wavedict_paddle.py +++ b/olaflow/processing/sws_wavedict_paddle.py @@ -57,11 +57,11 @@ org = org.replace("{v}", "\n".join(v.astype(np.str_))) org = org.replace("{eta}", "\n".join(wl.astype(np.str_))) olaflow_root.joinpath("constant", "waveDict").write_text(org) -fig, ax = plt.subplots() +fig, (ax, ax2) = plt.subplots(2) ax.plot(t, wl) ax.autoscale(True, "x", tight=True) ax.set(xlabel="t (s)", ylabel="z (m)") -ax2 = ax.twinx() ax2.plot(t, v) -ax2.set(ylabel="U (m/s)") +ax2.autoscale(True, "x", tight=True) +ax2.set(xlabel="t (s)", ylabel="U (m/s)") fig.savefig(olaflow_root.joinpath("constant", "wave.pdf"))