diff --git a/exercises/exerciseA/plot.py b/exercises/exerciseA/plot.py index 4130224..5993296 100755 --- a/exercises/exerciseA/plot.py +++ b/exercises/exerciseA/plot.py @@ -19,5 +19,18 @@ fig, axs = plt.subplots() # CREATE YOUR PLOT HERE # Remember to label your axis # Feel free to make it pretty +difference = [] + +for i in range(len(timings)): + diff = (timings[i] - timings[0]) / threads[i] + difference.append(diff) + +print(difference) + +plt.plot(threads, difference, color='orange') +plt.xlabel('Threads') +plt.ylabel('Time (s)') +plt.title('Relative processing time per thread') + +plt.savefig('threads_v_timings_2.png', dpi=300) -plt.savefig('threads_v_timings.png', dpi=300) diff --git a/threads_v_timings.png b/threads_v_timings.png new file mode 100644 index 0000000..19b7bbc Binary files /dev/null and b/threads_v_timings.png differ diff --git a/threads_v_timings_2.png b/threads_v_timings_2.png new file mode 100644 index 0000000..154ffe6 Binary files /dev/null and b/threads_v_timings_2.png differ