-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotsRuntimeOptPAlgo.py
More file actions
39 lines (25 loc) · 1012 Bytes
/
plotsRuntimeOptPAlgo.py
File metadata and controls
39 lines (25 loc) · 1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import matplotlib.pyplot as plt
import numpy as np
algo_points_x = np.array([10, 20, 50, 100])
algo_points_y = np.array([3.5, 8.5, 82, 824])
plt.plot(algo_points_x, algo_points_y)
rounding_points_x = np.array([10, 20, 50, 100])
rounding_points_y = np.array([59.17, 1235.47, 79859.04, 16835609.43])
plt.plot(rounding_points_x, rounding_points_y)
plt.yticks(np.arange(0, 17000001, 1000000))
plt.xticks(np.arange(10, 101, 10))
plt.xlabel('Number of elements in sets')
plt.ylabel('Time in ms')
plt.legend(['Algorithm', 'Optimal solution'])
algo_points_x = np.array([10, 20, 50])
algo_points_y = np.array([3.5, 8.5, 82])
plt.plot(algo_points_x, algo_points_y)
rounding_points_x = np.array([10, 20, 50])
rounding_points_y = np.array([59.17, 1235.47, 79859.04])
plt.plot(rounding_points_x, rounding_points_y)
plt.yticks(np.arange(0, 80001, 10000))
plt.xticks(np.arange(10, 51, 10))
plt.xlabel('Number of elements in sets')
plt.ylabel('Time in ms')
plt.legend(['Algorithm', 'Optimal solution'])
plt.show()