#!/bin/bash

if ! which gnuplot > /dev/null 2>&1
then
    echo 'gnuplot not found - skipping graph creation' >&2
    exit 1
fi

gnuplot<<EOF
    set term pngcairo size 800,400

    set output "divPhi.png"
    set xlabel "Time"
    set ylabel "div(phi) at pRef"
    plot '../postProcessing/probes/0/divPhi' w l lt 3 lw 2 t "current", \
         './reference/probes/0/divPhi'       w l lt 0 lw 3 t "reference", \
         './reference/probes/0/divPhiNoFix'  w l lt -1 lw 1 t "before fix"

EOF

#------------------------------------------------------------------------------
