From 3da90de106e36738d0e208ea19bb0d72713c6d90 Mon Sep 17 00:00:00 2001 From: ASPP Student Date: Fri, 30 Aug 2024 12:17:25 +0300 Subject: [PATCH] create plot of time as a function of threads --- exercises/exerciseA/plot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/exercises/exerciseA/plot.py b/exercises/exerciseA/plot.py index 4130224..b764b8b 100644 --- a/exercises/exerciseA/plot.py +++ b/exercises/exerciseA/plot.py @@ -1,4 +1,5 @@ import os +import re import numpy as np import matplotlib.pyplot as plt @@ -15,7 +16,10 @@ timings = np.array(timings) print('This is the data I loaded: threads =', threads, ', timings =',timings) fig, axs = plt.subplots() - +plt.scatter(threads, timings) +plt.xlabel('Number of threads') +plt.ylabel('Time (seconds)') +#plt.show() # CREATE YOUR PLOT HERE # Remember to label your axis # Feel free to make it pretty