import matplotlib.pyplot as plt import pandas as pd # Data interactions = list(range(1, 101)) ricechain_plus = [ 14.04416557, 14.04386043, 14.04418, 14.04418, 14.04418, 14.04418043, 14.04418029, 14.04418014, 14.04418057, 14.04418086, 14.04418086, 14.04418114, 14.04418171, 14.044181, 14.04418157, 14.04418143, 14.04418229, 14.04418186, 14.044182, 14.04418271, 14.04427631, 14.04429062, 14.04430493, 14.04431924, 14.04433355, 14.04434786, 14.04436216, 14.04437647, 14.04439078, 14.04440509, 14.0444194, 14.04443371, 14.04444802, 14.04446233, 14.04447664, 14.04449095, 14.04450526, 14.04451957, 14.04453388, 14.04454819, 14.0445625, 14.04457681, 14.04459112, 14.04460543, 14.04461974, 14.04463405, 14.04464836, 14.04466267, 14.04467698, 14.04469128, 14.04470559, 14.0447199, 14.04473421, 14.04474852, 14.04476283, 14.04477714, 14.04479145, 14.04480576, 14.04482007, 14.04483438, 14.04484869, 14.044863, 14.04487731, 14.04489162, 14.04490593, 14.04492024, 14.04493455, 14.04494886, 14.04496317, 14.04497748, 14.04499179, 14.0450061, 14.0450204, 14.04503471, 14.04504902, 14.04506333, 14.04507764, 14.04509195, 14.04510626, 14.04512057, 14.04513488, 14.04514919, 14.0451635, 14.04517781, 14.04519212, 14.04520643, 14.04522074, 14.04523505, 14.04524936, 14.04526367, 14.04527798, 14.04529229, 14.0453066, 14.04532091, 14.04533521, 14.04534952, 14.04536383, 14.04537814, 14.04539245, 14.04540676 ] mbrrsm = [ 15.23256983, 15.20245678, 15.19035678, 15.26712489, 15.24893567, 15.26547238, 15.25123689, 15.24578964, 15.25489635, 15.26957348, 15.26256983, 15.25839567, 15.26912478, 15.25689347, 15.26174589, 15.25478935, 15.26829374, 15.26256983, 15.25689347, 15.26912478, 15.25689347, 15.26174589, 15.26829374, 15.25478935, 15.26547238, 15.24893567, 15.26712489, 15.20245678, 15.23256983, 15.21578964, 15.23456879, 15.24678945, 15.25278964, 15.26893547, 15.27693567, 15.28493567, 15.29293567, 15.30093567, 15.30893567, 15.31693567, 15.32493567, 15.33293567, 15.34093567, 15.34893567, 15.35693567, 15.36493567, 15.37293567, 15.38093567, 15.38893567, 15.39693567, 15.40493567, 15.41293567, 15.42093567, 15.42893567, 15.43693567, 15.44493567, 15.45293567, 15.46093567, 15.46893567, 15.47693567, 15.48493567, 15.49293567, 15.50093567, 15.50893567, 15.51693567, 15.52493567, 15.53293567, 15.54093567, 15.54893567, 15.55693567, 15.56493567, 15.57293567, 15.58093567, 15.58893567, 15.59693567, 15.60493567, 15.61293567, 15.62093567, 15.62893567, 15.63693567, 15.64493567, 15.65293567, 15.66093567, 15.66893567, 15.67693567, 15.68493567, 15.69293567, 15.70093567, 15.70893567, 15.71693567, 15.72493567, 15.73293567, 15.74093567, 15.74893567, 15.75693567, 15.76493567, 15.77293567, 15.78093567, 15.78893567, 15.79693567 ] kranti = [ 15.44572895, 15.41236985, 15.42365871, 15.49856729, 15.47896435, 15.48592345, 15.47239654, 15.46829345, 15.47829564, 15.49537485, 15.48956734, 15.48436956, 15.49579634, 15.48325784, 15.48769523, 15.48236584, 15.49573284, 15.48956734, 15.48325784, 15.49579634, 15.48325784, 15.48769523, 15.49573284, 15.48236584, 15.48592345, 15.47896435, 15.49856729, 15.41236985, 15.44572895, 15.42578945, 15.44356879, 15.45789456, 15.46378947, 15.47893547, 15.48693547, 15.49493547, 15.50293547, 15.51093547, 15.51893547, 15.52693547, 15.53493547, 15.54293547, 15.55093547, 15.55893547, 15.56693547, 15.57493547, 15.58293547, 15.59093547, 15.59893547, 15.60693547, 15.61493547, 15.62293547, 15.63093547, 15.63893547, 15.64693547, 15.65493547, 15.66293547, 15.67093547, 15.67893547, 15.68693547, 15.69493547, 15.70293547, 15.71093547, 15.71893547, 15.72693547, 15.73493547, 15.74293547, 15.75093547, 15.75893547, 15.76693547, 15.77493547, 15.78293547, 15.79093547, 15.79893547, 15.80693547, 15.81493547, 15.82293547, 15.83093547, 15.83893547, 15.84693547, 15.85493547, 15.86293547, 15.87093547, 15.87893547, 15.88693547, 15.89493547, 15.90293547, 15.91093547, 15.91893547, 15.92693547, 15.93493547, 15.94293547, 15.95093547, 15.95893547, 15.96693547, 15.97493547, 15.98293547, 15.99093547, 15.99893547, 16.00693547 ] potx = [ 15.11234567, 15.07894651, 15.06547238, 15.14256847, 15.12568423, 15.13674236, 15.12236984, 15.11829547, 15.12739658, 15.14236584, 15.13695784, 15.13289647, 15.14436589, 15.13235678, 15.13695748, 15.12895347, 15.14235679, 15.13695784, 15.13235678, 15.14436589, 15.13235678, 15.13695748, 15.14235679, 15.12895347, 15.13674236, 15.12568423, 15.14256847, 15.07894651, 15.11234567, 15.09578964, 15.11578946, 15.12789456, 15.13478956, 15.14893547, 15.15693567, 15.16493567, 15.17293567, 15.18093567, 15.18893567, 15.19693567, 15.20493567, 15.21293567, 15.22093567, 15.22893567, 15.23693567, 15.24493567, 15.25293567, 15.26093567, 15.26893567, 15.27693567, 15.28493567, 15.29293567, 15.30093567, 15.30893567, 15.31693567, 15.32493567, 15.33293567, 15.34093567, 15.34893567, 15.35693567, 15.36493567, 15.37293567, 15.38093567, 15.38893567, 15.39693567, 15.40493567, 15.41293567, 15.42093567, 15.42893567, 15.43693567, 15.44493567, 15.45293567, 15.46093567, 15.46893567, 15.47693567, 15.48493567, 15.49293567, 15.50093567, 15.50893567, 15.51693567, 15.52493567, 15.53293567, 15.54093567, 15.54893567, 15.55693567, 15.56493567, 15.57293567, 15.58093567, 15.58893567, 15.59693567, 15.60493567, 15.61293567, 15.62093567, 15.62893567, 15.63693567, 15.64493567, 15.65293567, 15.66093567, 15.66893567, 15.67693567 ] ricechain_2022 = [ 15.35647128, 15.32548962, 15.34695124, 15.42578134, 15.40589647, 15.41628529, 15.40295136, 15.39895124, 15.40912756, 15.42479635, 15.41839628, 15.41356894, 15.42579468, 15.41389625, 15.41879245, 15.41256983, 15.42678125, 15.41839628, 15.41389625, 15.42579468, 15.41389625, 15.41879245, 15.42678125, 15.41256983, 15.41628529, 15.40589647, 15.42578134, 15.32548962, 15.35647128, 15.34578963, 15.36278965, 15.37894567, 15.38589457, 15.40289457, 15.41089457, 15.41889457, 15.42689457, 15.43489457, 15.44289457, 15.45089457, 15.45889457, 15.46689457, 15.47489457, 15.48289457, 15.49089457, 15.49889457, 15.50689457, 15.51489457, 15.52289457, 15.53089457, 15.53889457, 15.54689457, 15.55489457, 15.56289457, 15.57089457, 15.57889457, 15.58689457, 15.59489457, 15.60289457, 15.61089457, 15.61889457, 15.62689457, 15.63489457, 15.64289457, 15.65089457, 15.65889457, 15.66689457, 15.67489457, 15.68289457, 15.69089457, 15.69889457, 15.70689457, 15.71489457, 15.72289457, 15.73089457, 15.73889457, 15.74689457, 15.75489457, 15.76289457, 15.77089457, 15.77889457, 15.78689457, 15.79489457, 15.80289457, 15.81089457, 15.81889457, 15.82689457, 15.83489457, 15.84289457, 15.85089457, 15.85889457, 15.86689457, 15.87489457, 15.88289457, 15.89089457, 15.89889457, 15.90689457, 15.91489457, 15.92289457, 15.93089457 ] ######################## # 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 Transaction Time Across Interactions') plt.xlabel('Interactions', fontsize=14) plt.ylabel('Average Transaction Time (s)', fontsize=14) plt.xticks(fontsize=13) plt.yticks(fontsize=13) plt.legend(fontsize=14) plt.grid(True) plt.show()