#!/bin/bash

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

gnuplot<<EOF
    set grid

    #---PNG---
    set term pngcairo size 800,600
    FType = '.png'

    #---singleGraph---
    set output 'dampingCoefficient'.FType
    set xlabel 'r/R [-]'
    set ylabel 'f [-]'
    set key left
    set yrange [0:1.1]
    plot '../postProcessing/graph/0.2/line.csv' u (\$1/0.0256):2 w l lw 2 t "current", \
          'line.csv'                            u (\$1/0.0256):2 w l dt 2 lw 2 t "reference"
EOF

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