My build of nnn with minor changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
481 B

  1. #!/usr/bin/env python3
  2. #
  3. # Usage: ./plot-bench.py datafile
  4. # (where datafile is the output of benchmark.sh)
  5. import matplotlib.pyplot as plt
  6. import sys
  7. def bench_file_to_lists(infile):
  8. return [[float(entry) for entry in line.split('\t')[1:]] for line in infile.readlines()]
  9. def plot_data(data):
  10. fig = plt.figure()
  11. ax = fig.add_axes([0,0,1,1])
  12. ax.violinplot(data)
  13. plt.savefig("plot.svg")
  14. filename = sys.argv[1]
  15. plot_data(bench_file_to_lists(open(filename)))