Show the full range in histograms

Branch: master
This commit is contained in:
David Peter committed 2020-01-23 13:04:15 +01:00
1 parent 3a99fe2f75
commit a3f0278074
1 file changed
+6 -1
+6 -1
View File
@@ -4,6 +4,7 @@
import argparse
import json
import numpy as np
import matplotlib.pyplot as plt
parser = argparse.ArgumentParser(description=__doc__)
@@ -17,7 +18,11 @@ with open(args.file) as f:
commands = [b["command"] for b in results]
all_times = [b["times"] for b in results]
plt.hist(all_times, label=commands, bins="auto", histtype="bar")
plt.hist(all_times,
label=commands,
bins="auto",
histtype="bar",
range=(np.min(all_times), np.max(all_times)))
plt.legend(prop={'family': ['Source Code Pro', 'Fira Mono', 'Courier New']})
plt.xlabel("Time [s]")