From 236b06a88f709ca6c70ce0c7adfb57f9f0b2a60d Mon Sep 17 00:00:00 2001 From: Thibaut Horel Date: Wed, 11 May 2016 22:03:53 -0400 Subject: Add final code used during experiments --- proof2.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 proof2.py (limited to 'proof2.py') diff --git a/proof2.py b/proof2.py new file mode 100644 index 0000000..7fe92d9 --- /dev/null +++ b/proof2.py @@ -0,0 +1,36 @@ +#!/usr/bin/env python +import numpy as np +import matplotlib.pyplot as plt +import matplotlib +import seaborn + +seaborn.set_style("white") +matplotlib.rcParams.update({'xtick.labelsize': 12}) +matplotlib.rcParams.update({'ytick.labelsize': 12}) +matplotlib.rcParams.update({'legend.fontsize': 12}) +matplotlib.rcParams.update({'axes.titlesize': 12}) +matplotlib.rcParams.update({'axes.labelsize': 12}) + +N = 3 + +naive = (973166, 528297, 107256) +sorte = (951139, 391564, 21161) +explicit = (742536, 249948, 25932) + +ind = np.arange(N) # the x locations for the groups +width = 0.25 # the width of the bars + +fig, ax = plt.subplots() +rects1 = ax.bar(ind-1.5*width, naive, width) +rects2 = ax.bar(ind-0.5*width, sorte, width, color='g') +rects3 = ax.bar(ind+0.5*width, explicit, width, color='r') + + +# add some text for labels, title and axes ticks +ax.set_ylabel('Time per proof (ns)') +ax.set_xlabel('# proofs') +ax.set_xticks(ind) +ax.set_xticklabels(('2000', '20000', '200000')) + +ax.legend((rects1[0], rects2[0], rects3[0]), ('Naive', 'Sorted', 'Explicit')) +plt.savefig("proofs2.pdf", bbox_inches='tight') -- cgit v1.2.3-70-g09d2