python script setting up path

This commit is contained in:
Konstantinos Katrioplas 2018-05-22 10:34:32 +02:00
parent 00c782b277
commit 284c2d9d33
3 changed files with 12 additions and 4 deletions

View File

@ -0,0 +1,5 @@
nb_vertices with_ch without_ch
2775 0.037331 0.327787
16670 0.118251 1.96901
66692 0.362664 7.75459
266780 1.20984 32.166

View File

@ -1,18 +1,19 @@
import matplotlib.pyplot as plt
import numpy as np
data = np.loadtxt("build/data/times.txt", skiprows = 1)
#path-to-benchmarks
benchmarkfile='data/times.txt'
data = np.loadtxt(benchmarkfile, skiprows = 1)
x = data[:, 0]
y1 = data[:, 1]
y2 = data[:, 2]
plt.plot(x, y1, 'go--', label='with convex hull')
plt.plot(x, y2, 'ro--', label='without convex hull')
legend = plt.legend(loc='best')
plt.xlabel('#vertices')
plt.ylabel('seconds')
plt.show()
plt.show()

View File

@ -0,0 +1,2 @@
To draw a graph with the benchmark times set the path-to-the-measurments in draw_benchmark_times.py if necessary,
and run the script with python 3.