Automatic commit. Wed Aug 1 13:00:33 WST 2012
[matches/honours.git] / research / TCS / plot.sh
diff --git a/research/TCS/plot.sh b/research/TCS/plot.sh
new file mode 100644 (file)
index 0000000..ccc6621
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# Script to plot .dat files
+
+title=$(grep "# Title: " $0 | sed 's/# Title: //g')
+labels=$(grep "# Format: " $0 | sed 's/# Format: //g')
+
+x=1
+ylabel="Counts"
+toplot="2 3 5"
+style="l"
+
+xlabel=$(echo $labels | tr " " "\n" | head --lines=$x | tail --lines=1)
+command="set title \"$title\""
+command="$command; set xlabel \"$xlabel\""
+command="$command; set ylabel \"$ylabel\""
+command="$command; plot \"$0\""
+
+for y in toplot; do
+       command="$command 
+
+
+
+

UCC git Repository :: git.ucc.asn.au