aboutsummaryrefslogtreecommitdiff
path: root/util/plot_gen.py
diff options
context:
space:
mode:
authorJ08nY2017-12-28 18:54:19 +0100
committerJ08nY2017-12-28 18:54:19 +0100
commit70bcab713bcc36f3f6a5886f4651967e1585fad6 (patch)
tree267a034a146216cd4b4e0f2aa605040a1059f1f2 /util/plot_gen.py
parent552289fd86446416eefec6356659a8333d091f79 (diff)
downloadECTester-70bcab713bcc36f3f6a5886f4651967e1585fad6.tar.gz
ECTester-70bcab713bcc36f3f6a5886f4651967e1585fad6.tar.zst
ECTester-70bcab713bcc36f3f6a5886f4651967e1585fad6.zip
Diffstat (limited to 'util/plot_gen.py')
-rwxr-xr-xutil/plot_gen.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/util/plot_gen.py b/util/plot_gen.py
index 9c824a6..00892b5 100755
--- a/util/plot_gen.py
+++ b/util/plot_gen.py
@@ -12,6 +12,7 @@
import numpy as np
import matplotlib.pyplot as plt
+import matplotlib.ticker as ticker
from operator import itemgetter
import argparse
@@ -58,9 +59,16 @@ if __name__ == "__main__":
if plots[2]:
axe_hist = fig.add_subplot(n_plots, 1, plot_i)
- axe_hist.hist(time_data, bins=400, log=True)
+ time_max = max(time_data)
+ time_avg = np.average(time_data)
+ time_median = np.median(time_data)
+ axe_hist.hist(time_data, bins=time_max/3, log=True)
+ axe_hist.axvline(x=time_avg, alpha=0.7, linestyle="dotted", color="red", label="avg = {}".format(time_avg))
+ axe_hist.axvline(x=time_median, alpha=0.7, linestyle="dotted", color="green", label="median = {}".format(time_median))
axe_hist.set_ylabel("count\n(log)")
axe_hist.set_xlabel("time (ms)")
+ axe_hist.xaxis.set_major_locator(ticker.MaxNLocator())
+ axe_hist.legend(loc="best")
if opts.output is None:
plt.show()