solved exercise A #7
3 changed files with 14 additions and 1 deletions
|
@ -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)
|
||||
|
|
BIN
threads_v_timings.png
Normal file
BIN
threads_v_timings.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 69 KiB |
BIN
threads_v_timings_2.png
Normal file
BIN
threads_v_timings_2.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
Loading…
Add table
Add a link
Reference in a new issue