From e69164e6f1db086f3fb471f2ea8eecde84191343 Mon Sep 17 00:00:00 2001 From: ASPP Student Date: Fri, 30 Aug 2024 12:09:47 +0300 Subject: [PATCH] plot multi-thread timings --- .gitignore | 3 +++ exercises/exerciseA/plot.py | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d6fa4f6..13d295e 100644 --- a/.gitignore +++ b/.gitignore @@ -117,3 +117,6 @@ dmypy.json # Pyre type checker .pyre/ + +# pngs +*.png diff --git a/exercises/exerciseA/plot.py b/exercises/exerciseA/plot.py index 4130224..b9a58b6 100644 --- a/exercises/exerciseA/plot.py +++ b/exercises/exerciseA/plot.py @@ -16,8 +16,12 @@ print('This is the data I loaded: threads =', threads, ', timings =',timings) fig, axs = plt.subplots() -# CREATE YOUR PLOT HERE + # Remember to label your axis # Feel free to make it pretty +axs.plot(threads, timings, '*') +axs.set_xlabel('number of threads') +axs.set_ylabel('processing time') + plt.savefig('threads_v_timings.png', dpi=300)