summaryrefslogtreecommitdiff
path: root/results
diff options
context:
space:
mode:
Diffstat (limited to 'results')
-rwxr-xr-xresults/graphhelper.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/results/graphhelper.py b/results/graphhelper.py
new file mode 100755
index 0000000..6c6bbe2
--- /dev/null
+++ b/results/graphhelper.py
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+
+import re
+import sys
+
+for line in sys.stdin:
+
+ res = re.findall('(.*?) \((.*?)\)', line)
+
+ plot1 = ["(0,0)"]
+ plot2 = ["(0,0)"]
+ plot3 = ["(0,0)"]
+
+ current = 100;
+ for tup in res:
+ val = float(tup[0]);
+ stdev = float(tup[1]);
+
+ plot1.append("(" + str(current) + "," + "{0:.3f}".format(val) + ")")
+ plot2.append("(" + str(current) + "," + "{0:.3f}".format(val + stdev) + ")")
+ plot3.append("(" + str(current) + "," + "{0:.3f}".format(val - stdev) + ")")
+
+ current += 100
+
+ print("{{{0}}};".format("".join(plot1)))
+ print("{{{0}}};".format("".join(plot2)))
+ print("{{{0}}};".format("".join(plot3)))
+