This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Plot two line graphs | |
import matplotlib.pyplot as plt | |
x = [5,10,15,20,25,30] | |
samy1 = [5221.72,5296.28,5110.63,5560.02,4996.37,6552.03] | |
damy2 = [5169.35,5114.42,5081.98,5158.42,5107.2,5162.72] | |
#Range for X Axis | |
plt.xlim(0.5,40) | |
#Range for Y Axis | |
plt.ylim(4500,7500) | |
#Plot Line 1 | |
plt.plot(x,samy1, color='red',label='SAM Execution Time', linewidth=2) | |
#Plot Line 2 | |
plt.plot(x,damy2, color='black',label='DAM Execution Time', linewidth=2) | |
#Background Colot change | |
plt.rcParams['axes.facecolor'] = 'lightslategray' | |
plt.legend(loc='best') | |
#Labels | |
plt.xlabel('M Threads', fontsize=24) | |
plt.ylabel('Time Seconds', fontsize=24) | |
#Title | |
plt.title('Time vs Number of Threads', fontsize=24) | |
plt.show() |
No comments:
Post a Comment