X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=research%2FTCS%2Fplot.sh;h=2bc0c7893ac174c43580414a1d053d343adab633;hb=70a96cca12cb006506461d26cd112bab179fe74c;hp=8ce6a8f1f628fb454dedcbf7322d08079e48afbf;hpb=df79d0a9c6c8d8fb2f91212a31868033e4841b8b;p=matches%2Fhonours.git diff --git a/research/TCS/plot.sh b/research/TCS/plot.sh index 8ce6a8f1..2bc0c789 100755 --- a/research/TCS/plot.sh +++ b/research/TCS/plot.sh @@ -2,14 +2,14 @@ # Script to plot .dat files -x=2 -toplot="3 5" +x=1 +toplot="3" ylabel="Counts" -style="p" +style="lp" dir="/home/sam/Documents/University/honours/research/TCS" -title=$(grep "# Title: " $1 | sed 's/# Title: //g') -comment=$(grep "# Comment:" $1 | sed 's/# Comment: *//1' | head --bytes=100) +title=$(grep "# Title = " $1 | sed 's/# Title = //g') +comment=$(grep "# Comment = " $1 | sed 's/# Comment = *//1' | head --bytes=100) labels=$(grep -A 1 "# Data:" $1 | tail --lines=1 | sed 's/#//1') if [ "$title" == "" ]; then @@ -21,7 +21,7 @@ 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" != "" ]; then if [ $2 == $1 ]; then exit 1 fi @@ -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:1]" plot="plot " for y in $toplot; do lab=$(echo $labels | tr " " "\n" | head --lines=$y | tail --lines=1)