diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-12-03 10:36:51 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-12-03 10:36:51 +0000 |
| commit | 4220beb6dfd67a124df5cb039a1497c186d6d313 (patch) | |
| tree | 7ece4192d0c56b47a5c085b7b41e5c8029a815d8 /scripts/plotdiff | |
| parent | 829d18703379c053f3c0eeb929779f64c87c2713 (diff) | |
Add script to plot output of dcpdiff.
Diffstat (limited to 'scripts/plotdiff')
| -rwxr-xr-x | scripts/plotdiff | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/plotdiff b/scripts/plotdiff new file mode 100755 index 00000000..debd7000 --- /dev/null +++ b/scripts/plotdiff @@ -0,0 +1,25 @@ +#!/usr/bin/python + +import sys +import matplotlib.pylab as plt +import numpy + +mean = None +deviation = None + +with open(sys.argv[1], 'r') as f: + for l in f: + l = l.strip() + s = l.split() + if l.startswith('Compared'): + N = int(s[3]) + if mean is None: + mean = numpy.zeros(int(s[5])) + deviation = numpy.zeros(int(s[5])) + elif l.startswith('mean'): + mean[N] = float(s[2]) + deviation[N] = float(s[5]) + +plt.plot(mean) +plt.plot(deviation) +plt.show() |
