summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConnor Moore <connor.moore@psi.ch>2026-07-07 09:02:40 +0200
committerConnor Moore <connor.moore@psi.ch>2026-07-07 09:02:40 +0200
commitcd1ce15b8c3636d517bab703e1a000566e3fdc3d (patch)
tree410327e713779a69341cd333a5963c33f7c41372
parentd7e007c906e2e214030123c603b942b83c400909 (diff)
Added results plotting with gnuplot
-rw-r--r--plot.gnu27
1 files changed, 27 insertions, 0 deletions
diff --git a/plot.gnu b/plot.gnu
new file mode 100644
index 0000000..859a6ab
--- /dev/null
+++ b/plot.gnu
@@ -0,0 +1,27 @@
+set term x11 persist
+
+exp_keff = system("cat results/explicit.out | grep 'Combined k-effective' | cut -d '=' -f 2 | cut -d '+' -f 1 | sed 's/ //g'")
+exp_pm = system("cat results/explicit.out | grep 'Combined k-effective' | cut -d '=' -f 2 | cut -d '-' -f 2 | sed 's/ //g'")
+exp_ppm = exp_keff+exp_pm
+exp_mpm = exp_keff-exp_pm
+
+vwh_keff = system("cat results/vwh.out | grep 'Combined k-effective' | cut -d '=' -f 2 | cut -d '+' -f 1 | sed 's/ //g'")
+vwh_pm = system("cat results/vwh.out | grep 'Combined k-effective' | cut -d '=' -f 2 | cut -d '-' -f 2 | sed 's/ //g'")
+vwh_ppm = vwh_keff+vwh_pm
+vwh_mpm = vwh_keff-vwh_pm
+
+set arrow from graph 0, first exp_keff to graph 1, first exp_keff nohead front lc rgb "red" dt 2
+set arrow from graph 0, first vwh_keff to graph 1, first vwh_keff nohead front lc rgb "blue" dt 2
+
+set object 1 rectangle from graph 0, first exp_mpm to graph 1, first exp_ppm back fc rgb "red" fillstyle pattern 4 noborder
+set object 2 rectangle from graph 0, first vwh_mpm to graph 1, first vwh_ppm back fc rgb "blue" fillstyle pattern 4 noborder
+
+set yrange [1.06:1.1]
+set format y "%.5f"
+set style fill pattern 4 noborder
+
+plot "results/rpt_table" using 1:2:3 with yerrorlines dt 2 title "RPT K_{eff}", \
+ "results/rrpt_table" using 1:2:3 with yerrorlines dt 2 title "RRPT K_{eff}", \
+ keyentry with lines title "Explicit K_{eff}" lc rgb "red" dt 2, \
+ keyentry with lines title "VWH K_{eff}" lc rgb "blue" dt 2
+