From 9a5c40d0569db963dcb5e2e897831142b98cd7b0 Mon Sep 17 00:00:00 2001 From: RncLsn Date: Mon, 6 Jul 2015 15:07:13 +0100 Subject: Added script for plotting times. --- scripts/plottimes.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 scripts/plottimes.py (limited to 'scripts/plottimes.py') diff --git a/scripts/plottimes.py b/scripts/plottimes.py new file mode 100644 index 0000000..767374f --- /dev/null +++ b/scripts/plottimes.py @@ -0,0 +1,29 @@ +import sys +import numpy as np +import matplotlib.pyplot as plt +import json + +def main(input_filename_1, input_filename_2): + + with open(input_filename_1, 'r') as f: + data_1 = json.load(f) + + with open(input_filename_2, 'r') as f: + data_2 = json.load(f) + + times_1 = [(x, data_1[x]['totalTime']) for x in sorted([y for y in data_1])] + times_2 = [(x, data_2[x]['totalTime']) for x in sorted([y for y in data_2])] + + x = np.array(zip(*times_1)[0]) + y_1 = np.array(zip(*times_1)[1]) + y_2 = np.array(zip(*times_2)[1]) + colors_1 = '#eeefff' + colors_2 = '#11ee55' + + plt.scatter(x, y_1, c=colors_1, marker=',') + plt.scatter(x, y_2, c=colors_2, marker='v') + plt.show() + + +if __name__ == '__main__': + main(sys.argv[1], sys.argv[2]) -- cgit v1.2.3