#!/bin/bash

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

gnuplot<<EOF

    time = '0.00025'

    D = 3e-3

    set terminal pngcairo color enhanced


    #---delta---
    FILE = '../postProcessing/planeA/'.time.'/cutPlane.xy'
    set output 'delta_surface.png'

    set title 't = '.time.' s'

    set xlabel 'x/D'
    set ylabel 'y/D'
    set zlabel '{/Symbol d}' offset -2

    set xtics 0.5
    set ytics 0.5

    set view equal xy
    set ticslevel 0
    unset parametric

    set mapping cartesian
    set hidden3d
    set dgrid3d 11,51 qnorm 3

    splot FILE u (\$1/D):(\$2/D):4 w l notitle

EOF

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