X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=research%2FTCS%2Fplot2.sh;h=c135731444c059177c4d91f86d8807bc421ff531;hb=00d5e2105fe3c0b5ce338154b37a07509c4166c7;hp=5155d4bb4a808e3263ef538d4a36930057ff75d1;hpb=2f97fc2b41a6bc5416765c8f48e999aab2e948f2;p=matches%2Fhonours.git diff --git a/research/TCS/plot2.sh b/research/TCS/plot2.sh index 5155d4bb..c1357314 100755 --- a/research/TCS/plot2.sh +++ b/research/TCS/plot2.sh @@ -3,7 +3,7 @@ # Script to plot .dat files x=2 -toplot="3 5" +toplot="3" ylabel="Counts" style="p" dir="/home/sam/Documents/University/honours/research/TCS" @@ -21,8 +21,8 @@ filename=$(echo $1 | sed -e "s:$dir::g") title="$filename\n$title" xlabel=$(echo $labels | tr " " "\n" | head --lines=$x | tail --lines=1) -if [ $2 != "" ]; then - if [ $2 == $1 ]; then +if [ "$2" != "" ]; then + if [ "$2" == "$1" ]; then exit 1 fi command="set term png size 1024,800; set output \"$2\"" @@ -34,6 +34,7 @@ command="$command; set title \"$title\"" command="$command; set xlabel \"$xlabel\"" command="$command; set ylabel \"$ylabel\"" command="$command; set key outside right" +command="$command; set yrange [0:1]" plot="plot " for y in $toplot; do lab=$(echo $labels | tr " " "\n" | head --lines=$y | tail --lines=1)