We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f63c3f9 commit 7ea7316Copy full SHA for 7ea7316
python-first/chart.py
@@ -45,12 +45,13 @@
45
46
fig, ax = plt.subplots()
47
48
-plot = ax.plot(positions, looping_times)
49
-plot = ax.plot(positions, generator_times)
+plot = ax.plot(positions, looping_times, label="loop")
+plot = ax.plot(positions, generator_times, label="generator")
50
51
plt.xlim([0, LIST_SIZE])
52
plt.xlabel("Position of element to be found")
53
plt.ylim([0, max(max(looping_times), max(generator_times))])
54
plt.ylabel(f"Time to complete {TIMEIT_TIMES:,} times")
55
+plt.legend()
56
57
plt.show()
0 commit comments