From 3405e471d1c5ea67fbdc701394362df2886fceb8 Mon Sep 17 00:00:00 2001 From: alexmadison Date: Wed, 23 Feb 2022 12:49:07 +0100 Subject: [PATCH] added png output --- test/prsim_plot.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/prsim_plot.py b/test/prsim_plot.py index 4ca78a9..525dde8 100755 --- a/test/prsim_plot.py +++ b/test/prsim_plot.py @@ -159,7 +159,14 @@ Use -exclude='regex' to specify signals to exclude (or -ex).""") plt.arrow(t0, s1, 0, s0-s1 + 0.2*np.sign(s0-s1), head_width = 0, width = 0.2, ec = "none", lw = 0, fc = "black", length_includes_head = True) plt.scatter((t0),(s0), c = "black", s = 30) - file_out_path = file_path.replace(".out",".pdf") + + output_type = ".pdf" + for arg in argv: + if arg == "-png": output_type = ".png" + + file_out_path = file_path.replace(".out",output_type) + + plt.savefig(file_out_path, bbox_inches = "tight")