-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot.py
More file actions
32 lines (29 loc) · 692 Bytes
/
Copy pathplot.py
File metadata and controls
32 lines (29 loc) · 692 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
# Kaustav Vats (2016048)
import matplotlib.pyplot as plt
# In[]
x = [8, 15]
# x = [0, 8]
y = [
[58, 8905442],
[2429, 0],
[14, 680001],
[10, 312]
]
# y = [
# [0, 58],
# [0, 2429],
# [0, 14],
# [0, 10]
# ]
size = ["Bfs", "Dfs", "A*", "IDA*"]
# In[]
color = ['b', 'r', 'g', "y"]
plt.figure()
for i in range(len(size)):
plt.plot(x, y[i][:], marker='o', color=color[i], label="Execution time of %s"%size[i])
plt.ylabel("Execution Time in us")
plt.xlabel("Value of N in N-Puzzle Problem")
plt.title("Execution time for all serial algorithms")
plt.legend(loc='best')
# plt.show()
plt.savefig("serial_graph.png")