X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=research%2FTCS%2Fplot2.sh;h=775d4145814be6bcc31cdd8257e6896170492267;hb=8c40cf6d18b192436651eb671b2eacd761d98ae9;hp=c135731444c059177c4d91f86d8807bc421ff531;hpb=00d5e2105fe3c0b5ce338154b37a07509c4166c7;p=matches%2Fhonours.git diff --git a/research/TCS/plot2.sh b/research/TCS/plot2.sh index c1357314..775d4145 100755 --- a/research/TCS/plot2.sh +++ b/research/TCS/plot2.sh @@ -34,17 +34,22 @@ 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]" +#command="$command; set yrange [0:1]" plot="plot " for y in $toplot; do lab=$(echo $labels | tr " " "\n" | head --lines=$y | tail --lines=1) if [ "$lab" == "" ]; then lab=$y fi - plot="$plot \"$1\" u $x:$y w $style t \"$lab\"," + plot="$plot \"$1\" u $x:$y w $style t \"$1\"," done - plot=$(echo $plot | sed -e "s/,//$(echo $toplot | wc -w)") + +if [ "$3" != "" ]; then + plot="$plot, \"$3\" u $x:$y w $style t \"$3\"" +fi + + command="$command; $plot; exit" gnuplot="/usr/bin/gnuplot"