Skip to content

Commit fc1fa43

Browse files
committed
adding labels to chart
1 parent 8d44f86 commit fc1fa43

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

python-first/chart.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
from looping import find_match_loop
77
from test_cases import build_list
88

9-
TIMEIT_TIMES = 10_000
10-
LIST_SIZE = 1_000
9+
TIMEIT_TIMES = 100_000
10+
LIST_SIZE = 500
1111
POSITION_INCREMENT = 10
1212

1313
looping_times = []
@@ -49,6 +49,8 @@
4949
plot = ax.plot(positions, generator_times)
5050

5151
plt.xlim([0, LIST_SIZE])
52+
plt.xlabel("Position of element to be found")
5253
plt.ylim([0, max(max(looping_times), max(generator_times))])
54+
plt.ylabel(f"Time to complete {TIMEIT_TIMES:,} times")
5355

5456
plt.show()

0 commit comments

Comments
 (0)