import matplotlib.pyplot as plt import pandas as pd # Data interactions = list(range(1, 101)) ricechain_plus = [44.16557143, 43.86042857, 44.18, 44.18, 44.18, 44.18042857, 44.18028571, 44.18014286, 44.18057143, 44.18085714, 44.18085714, 44.18114286, 44.18171429, 44.181, 44.18157143, 44.18142857, 44.18228571, 44.18185714, 44.182, 44.18271429, 44.27630752, 44.29061708, 44.30492664, 44.3192362, 44.33354576, 44.34785532, 44.36216488, 44.37647444, 44.390784, 44.40509356, 44.41940311, 44.43371267, 44.44802223, 44.46233179, 44.47664135, 44.49095091, 44.50526047, 44.51957003, 44.53387959, 44.54818915, 44.56249871, 44.57680827, 44.59111783, 44.60542739, 44.61973695, 44.63404651, 44.64835607, 44.66266563, 44.67697519, 44.69128475, 44.70559431, 44.71990387, 44.73421343, 44.74852299, 44.76283255, 44.77714211, 44.79145166, 44.80576122, 44.82007078, 44.83438034, 44.8486899, 44.86299946, 44.87730902, 44.89161858, 44.90592814, 44.9202377, 44.93454726, 44.94885682, 44.96316638, 44.97747594, 44.9917855, 45.00609506, 45.02040462, 45.03471418, 45.04902374, 45.0633333, 45.07764286, 45.09195242, 45.10626198, 45.12057154, 45.1348811, 45.14919066, 45.16350021, 45.17780977, 45.19211933, 45.20642889, 45.22073845, 45.23504801, 45.24935757, 45.26366713, 45.27797669, 45.29228625, 45.30659581, 45.32090537, 45.33521493, 45.34952449, 45.36383405, 45.37814361, 45.39245317, 45.40676273] mbrrsm = [45.889695, 45.780612, 45.748278, 46.497755, 46.261678, 46.157565, 46.333342, 45.938002, 46.246274, 46.407345, 45.605911, 46.091477, 45.825542, 46.499489, 46.129214, 45.764447, 45.804378, 46.359605, 45.953956, 45.847108, 45.856387, 46.333256, 46.377442, 46.112482, 46.456062, 46.184907, 45.841664, 45.750627, 45.795544, 45.993202, 46.37782, 45.824258, 46.40784, 46.26342, 45.743276, 45.746845, 45.852319, 46.098734, 45.941171, 46.239787, 45.931268, 45.916218, 46.392074, 45.926194, 45.790364, 46.269094, 46.207421, 45.965504, 46.130432, 45.961186, 46.295875, 46.010507, 46.377763, 45.836681, 45.918366, 46.340048, 45.913926, 46.198826, 46.31233, 46.009697, 46.282208, 45.966278, 45.867543, 46.040545, 46.282336, 46.038021, 46.135869, 46.23055, 46.088971, 46.036437, 46.151041, 45.879916, 45.820737, 45.827804, 45.970562, 46.213256, 45.870289, 45.871086, 46.149292, 46.226125, 45.778099, 45.960189, 45.892718, 46.143221, 46.208758, 46.101665, 45.969287, 45.962597, 46.031048, 46.093172, 45.787729, 45.964833, 46.142368, 45.974254, 46.085781, 46.156637, 46.232576, 46.174738, 45.816606, 46.010157] kranti = [45.419571, 45.453656, 45.342785, 45.905395, 45.808605, 45.915746, 45.521321, 45.622281, 45.452694, 45.350928, 45.347828, 45.569835, 45.526103, 45.800672, 45.487944, 45.385089, 45.412405, 45.358989, 45.547702, 45.689732, 45.372616, 45.426542, 45.327328, 45.661275, 45.473336, 45.469558, 45.309509, 45.513277, 45.421025, 45.616314, 45.533012, 45.318421, 45.601264, 45.374854, 45.350919, 45.630255, 45.62129, 45.486017, 45.393428, 45.675867, 45.404578, 45.637076, 45.361633, 45.646037, 45.502898, 45.639462, 45.361111, 45.508828, 45.497855, 45.681325, 45.347615, 45.583209, 45.513004, 45.61295, 45.397983, 45.667787, 45.409918, 45.659785, 45.623803, 45.322249, 45.42025, 45.675785, 45.571238, 45.585109, 45.668289, 45.570329, 45.552764, 45.66313, 45.577737, 45.359666, 45.572868, 45.484439, 45.456413, 45.542892, 45.405875, 45.430566, 45.584337, 45.495213, 45.564479, 45.439586, 45.618202, 45.491856, 45.594358, 45.43792, 45.583309, 45.52157, 45.388428, 45.609198, 45.424944, 45.553863, 45.61266, 45.550925, 45.401116, 45.639542, 45.579041, 45.426369, 45.50092, 45.541469, 45.427664, 45.365314] potx = [45.009943, 44.823025, 44.865794, 44.886929, 45.121087, 44.688366, 44.925535, 45.208337, 44.920636, 44.748122, 45.044185, 44.859988, 44.811236, 44.770739, 44.805828, 44.931235, 44.881017, 45.114493, 44.967141, 44.936808, 44.799683, 44.971322, 45.053154, 44.995151, 44.760418, 45.118639, 45.097296, 44.796444, 45.194627, 44.893506, 44.806997, 45.029211, 44.939681, 45.142372, 44.853192, 45.121124, 44.825091, 44.861269, 44.953815, 44.849196, 44.97886, 44.845672, 45.127208, 44.909269, 44.799653, 45.011993, 44.845479, 44.820458, 44.994519, 45.027418, 44.949037, 44.856214, 45.089422, 45.040501, 44.962279, 44.932733, 44.901858, 44.802431, 44.916274, 44.911486, 45.009288, 44.859017, 45.02621, 44.85241, 45.00323, 45.022128, 44.917401, 44.959043, 45.033032, 44.885368, 44.942121, 45.000123, 44.927408, 45.014932, 44.84897, 45.101209, 45.055109, 45.129146, 44.91994, 44.999996, 44.950923, 45.089612, 44.872319, 45.033145, 44.897968, 45.126943, 45.053978, 44.866215, 44.825026, 44.87087, 44.879806, 45.078933, 45.012112, 44.898309, 44.860788, 45.008184, 45.069798, 44.93405, 45.078885, 45.005111] ricechain_2022 = [45.261253, 45.031403, 45.209045, 45.005048, 45.150915, 45.262924, 45.019158, 45.286576, 45.059065, 45.280159, 45.141191, 45.277401, 45.194303, 45.131182, 45.254209, 45.137675, 45.029988, 45.016463, 45.250421, 45.234654, 45.231183, 45.092292, 45.174697, 45.011672, 45.149693, 45.151083, 45.251727, 45.094051, 45.012951, 45.042257, 45.153299, 45.064893, 45.025453, 45.200312, 45.206553, 45.233186, 45.227683, 45.231865, 45.097155, 45.245512, 45.220434, 45.216267, 45.229049, 45.248494, 45.020107, 45.036612, 45.101618, 45.078248, 45.123329, 45.079922, 45.110192, 45.055801, 45.219164, 45.125365, 45.045845, 45.212703, 45.104194, 45.155297, 45.098749, 45.112683, 45.01009, 45.070679, 45.032881, 45.157623, 45.196282, 45.022722, 45.086325, 45.038482, 45.07593, 45.079676, 45.026493, 45.014592, 45.025245, 45.135169, 45.175808, 45.021211, 45.198553, 45.119376, 45.101664, 45.22349, 45.026622, 45.212768, 45.166445, 45.012658, 45.210147, 45.174721, 45.217487, 45.207599, 45.201648, 45.130827, 45.100936, 45.129141, 45.101375, 45.237243, 45.06187, 45.129159, 45.126683, 45.012009, 45.08006, 45.027982] # Plot ################ # Creating DataFrame df = pd.DataFrame({ 'Interactions': interactions, 'RiceChain-Plus': ricechain_plus, 'MBRRSM': mbrrsm, 'KRanTi': kranti, 'PoTx': potx, 'RiceChain': ricechain_2022 }) # Plotting plt.figure(figsize=(14, 8)) plt.plot(df['Interactions'], df['RiceChain-Plus'], label='RiceChain-Plus', linestyle='-', color='black', linewidth=3) plt.plot(df['Interactions'], df['MBRRSM'], label='MBRRSM', linestyle='--', color='blue', linewidth=3) plt.plot(df['Interactions'], df['KRanTi'], label='KRanTi', linestyle='-.', color='green', linewidth=3) plt.plot(df['Interactions'], df['PoTx'], label='PoTx', linestyle=':', color='red', linewidth=3) plt.plot(df['Interactions'], df['RiceChain'], label='RiceChain', linestyle='-.', color='purple', linewidth=3) ##plt.title('Average Execution Time Across Interactions') plt.xlabel('Interactions', fontsize=15) plt.ylabel('Average Execution Time (ms)', fontsize=14) plt.xticks(fontsize=13) plt.yticks(fontsize=13) plt.legend(fontsize=14) plt.grid(True) plt.show()