#!/bin/bash

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

gnuplot<<EOF
    set terminal pngcairo color enhanced size 800,600

    set key outside below
    set grid
    set xlabel 't [s]'
    set ylabel 'r_{/Symbol a} [-]'

    PATH = '../postProcessing/probes/0/alpha.'

    set output 'alpha.png'
    plot PATH.'air1'  w l lc 1 t 'air1'                   , \
         PATH.'air2'  w l lc 2 t 'air2'                   , \
         PATH.'water' w l lc 3 t 'water'                  , \
         0.64-64*x    w l lc 1 dt 2 t 'air1 analytical'   , \
              64*x    w l lc 2 dt 2 t 'air2 analytical'   , \
         0.36         w l lc 3 dt 2 t 'water analytical'

EOF

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